That's too much there...
/add_\w+/ and print(Yippie!\n), last while $_ = each %hash;
scalar each is underutilized. :)
what happened to grep?
print found it if grep{$_ =~ /foo/}keys %bar
If find this more readable, allthough Randall's solution is more efficient.
Maarten.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Jon Acierto [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 17, 2001 8:13 PM
Subject: Re: PERL IS NOT A HIGH LEVEL LANGUAGE
This thread is quite curious to me. Perl in most respects is a *higher*
level
- Original Message -
From: KAVANAGH, Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 15, 2001 12:28 PM
Subject: XML::Parser -- Problem with undefined entities in element
attributes
Hi there,
I've been bumping my head up against this problem all morning now,
- Original Message -
From: Brett W. McCoy [EMAIL PROTECTED]
To: Jennifer Pan [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, July 26, 2001 9:12 PM
Subject: Re: if in a list
[...]
Here's how I would code this:
foreach (@mylist) {
$boolean = ($_ eq 'AF1') ? 1 : 0;
}
- Original Message -
From: Sparkle Williams [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 2:43 PM
Subject: Unix syntax
I wrote a program running off a Windows NT platform and was trying to
convert it to a UNIX platform. My problem comes with my syntax. I keep
- Original Message -
From: Bob Bondi [EMAIL PROTECTED]
To: Beginners-perl [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 11:49 PM
Subject: Snippet to list both directories and files to an array or...?
I've been trying to use opendir($tempdir,@ARGV[0]) or die Couldn't open
the
- Original Message -
From: Bob Mangold [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 09, 2001 7:43 PM
Subject: perl / php question
Hello,
I'm not sure if anyone here can help me with this, but at least some
direction
in where to to look would be great.
I'm using a
- Original Message -
From: Mike Miller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 6:08 PM
Subject: Module to Parse MIME-encoded Email?
Gurus:
As a learning exercise I'm writing my own web-based POP3 client, and
wish to be able to handle emails which are
for ($i=0; $b[$i] != undef; $i++)
{
print STDOUT $b[$i];
}
and that seem logical but I was getting complaints such as..
Argument #stopped at 867\n isn't numeric in ne at ./page57_1.pl line
9, FILEIN chunk 1544.
anyhow hope you can enlighten me as to all this hullaballooo ;-)
The
- Original Message -
From: Wang, Lanbo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 30, 2001 12:04 AM
Subject: Problem with hash value
Hi Members,
It seemed that a value was incorrectly retrieved from the hash list in the
following small Perl script. .
- Original Message -
From: Jeff Yoak [EMAIL PROTECTED]
To: Luinrandir Hernson [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, June 09, 2001 12:10 AM
Subject: Re: if then else
At 05:35 PM 6/8/01 -0400, Luinrandir Hernson wrote:
ok, where did i go wrong now???
'=' is the
-Original Message-
From: Mark Martin [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 10:01
To: [EMAIL PROTECTED]
Subject: Substitution Problem
Hi,
I'm taking in a csv file and splitting it. One of the fields(doc) could
possibly have six spaces which will disrupt the
- Original Message -
From: Bob Mangold [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 05, 2001 9:28 PM
Subject: Re: Fwd: 'use' question
ok sorry for the lack of a script before,
here is a little test script i wrote to try to figure out how to use the
Getopt::Std
- Original Message -
From: Timothy Kimball [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, June 05, 2001 9:45 PM
Subject: Re: Fwd: 'use' question
M.W. Koskamp wrote:
: You are missing a semi-colon at the end of line 1
: after the #!/usr/local/bin/perl
You don't
- Original Message -
From: Nichole Bialczyk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 9:30 PM
Subject: append a file to another file
i understand how to open and create files, but let's say that i want to
open several files and insert them all into one large
- Original Message -
From: justin todd [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 10:18 AM
Subject: DB
Hi.
(...)
In short: Your webserver doesn't connect to your DB server.
Basically this had nothing to do with the NT Domain trusting another
- Original Message -
From: Yacketta,Ronald J [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Sent: Wednesday, May 23, 2001 10:52 PM
Subject: mail
Folks,
I search CPAN and found a good deal of Mail packages, seeing that I am
frankly new
which of them would you
- Original Message -
From: Chris Tunnell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 22, 2001 11:23 PM
Subject: Sendmail
I use a program called activeperl to run perl scripts on my W2k machine.
Does anyone know where the sendmail is located
Yes, on the nearest unix
- Original Message -
From: Matt Noel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 16, 2001 7:05 PM
Subject: Sorting a Two Dimensional Array
(...) I have a simple two-dimensional array, call it @Weights. I think of
the
first index as being the Row index and the second
- Original Message -
From: Ang Sei Heng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 15, 2001 7:18 PM
Subject: Oracle Database...
Hello Everyone,
Recently I did some database connection to Oracle via DBD::Oracle.
I manage to conncec to server, the follow statement
- Original Message -
From: Gross, Stephan [EMAIL PROTECTED]
To: 'Beginner Perl' [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 5:26 PM
Subject: Regexp Question Again
I wasn't clear last time. I wrote:
I want to match the following:
1) the letters PT
2) a space or nothing
3) a word
- Original Message -
From: Ang Sei Heng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 1:27 AM
Subject: Need help on Unicode Programming...
This is what I did:
-- BEGIN -
#!/usr/bin/perl -w
use Unicode::Map8;
use Unicode::String;
- Original Message -
From: justin todd [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Sent: Monday, May 07, 2001 6:30 PM
Subject: db connect
Hi Folks
I am running a IIS server and MSSQL7, both on the same machine.
The database server is called JUSTIN. The database
- Original Message -
From: justin todd [EMAIL PROTECTED]
To: Beginners (E-mail) [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 9:18 AM
Subject: Separate DB
Hi all.
I am running a IIS webserver and a separate MSSQL database.
Could anyone please tell me what the connection string
Here is what I have so far:
open (FILE, file2) || die cannot open file2\n;
open (OIDFILE, file1) || die cannot open file1\n;
while (OIDFILE) {
$new_oid = $_;
while (FILE) {
You opened FILE for output here.
besides this is not too efficient, because you read the whole file2 over and
over
- Original Message -
From: Me [EMAIL PROTECTED]
To: Christodoulou Demetris [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 03, 2001 10:26 AM
Subject: Re: How to implement Variable variable names?
Hi,
I am writing an application where i have to read
from a file variable
- Original Message -
From: Casey West [EMAIL PROTECTED]
To: M.W. Koskamp [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; cherukuwada subrahmanyam [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, May 02, 2001 6:45 PM
Subject: Re: eliminating duplicate lines in a file
On Wed, May 02, 2001
Programming the perl DBI would be a good book. Also learning perl from
O'reilly is fairly good.
If you get perl from activestate.com you get the perl documentation in html
format. Very good and worth reading.
Try read the different tutorials. I suggest perlsyn, perlop, and perl sub.
Also make a
print join \n, split , abcdefg;
split will give you a list where abcdefg is splitted on nothing.
so it will contain (a,b,c,d,e,f,g).
Join \n will join the items in the list with newlines between em.
So it will print:
a
b
c
d
e
f
If you want to reuse the array do this:
my @chars = split ,
- Original Message -
From: David H. Adler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 02, 2001 8:46 PM
Subject: Re: String deconstruction?
On Wed, May 02, 2001 at 11:28:14AM -0700, Ross Larner wrote:
Hello. I am attempting to print a string one character at a time.
- Original Message -
From: Paul Johnson [EMAIL PROTECTED]
To: Sean O'Leary [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 7:07 PM
Subject: Re: missing something obvious
On Wed, Apr 25, 2001 at 12:47:59PM -0400, Sean O'Leary wrote:
split (., $ARGV[0])
- Original Message -
From: Stout, Joel R [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 24, 2001 10:20 PM
Subject: [beginner] file parsing question
Sorry so lengthy but here goes:
I am a Perl newbie and trying to parse a file. Depending on the tags in
the
data I want
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, April 22, 2001 12:28 AM
Subject: How to send attacments
How do i send an html file as an attachment using sendmail?
Thanks
Take a look at the MIME::Lite module...
- Original Message -
From: Pang, Joseph [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 21, 2001 12:30 AM
Subject: Parsing newbie
Is there any lib/module I could use for data parsing?
I has some data format that the grammar is known (quite simple actually),
but
I
34 matches
Mail list logo