Bret Goodfellow [BG], on Wednesday, June 22, 2005 at 15:55 (-0600)
wrote these comments:
>This is what I actually did to resolve my issue:
>@words = split(/ * /, $line)
>Print "the third word is: $words[2]\n";
this is not good, you don't know about regexpes much, eh?
first argument in split is //
Chris Devers [CD], on Wednesday, June 22, 2005 at 17:53 (-0400 (EDT))
wrote the following:
CD> my $fields = split( /\s+/, $record );
CD> my $fourth = $fields[3];
CD> This problem doesn't require any looping! :-)
I, know, thats just example.
I read whole the message, in original was:
"I want
-Original Message-
From: Chris Devers [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 22, 2005 3:17 PM
To: Bret Goodfellow
Cc: Perl Beginners List
Subject: Re: finding needle in a haystack
On Wed, 22 Jun 2005, Bret Goodfellow wrote:
> All right, I know how to do this in REXX beca
On Wed, 22 Jun 2005, Ing. Branislav Gerzo wrote:
> Bret Goodfellow [BG], on Wednesday, June 22, 2005 at 15:11 (-0600)
> typed the following:
>
> BG> All right, I know how to do this in REXX because there is a word()
> BG> function, but how do I do this in Perl. I want to read in one record at
>
Bret Goodfellow [BG], on Wednesday, June 22, 2005 at 15:11 (-0600)
typed the following:
BG> All right, I know how to do this in REXX because there is a word()
BG> function, but how do I do this in Perl. I want to read in one record at
BG> a time, that has space-delimited fields. There may be mul
On Wed, 22 Jun 2005, Bret Goodfellow wrote:
> All right, I know how to do this in REXX because there is a word()
> function, but how do I do this in Perl.
The split() function is what you're looking for.
$ perldoc -f split
The perldoc gives this example:
A pattern matching the null st
All right, I know how to do this in REXX because there is a word()
function, but how do I do this in Perl. I want to read in one record at
a time, that has space-delimited fields. There may be multiple spaces
between the words. I want to be able to get for example, the 4th word
of the record. H