Re: finding needle in a haystack

2005-06-22 Thread Ing. Branislav Gerzo
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 //

Re: finding needle in a haystack

2005-06-22 Thread Ing. Branislav Gerzo
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

RE: finding needle in a haystack

2005-06-22 Thread Bret Goodfellow
-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

Re: finding needle in a haystack

2005-06-22 Thread Chris Devers
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 >

Re: finding needle in a haystack

2005-06-22 Thread Ing. Branislav Gerzo
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

Re: finding needle in a haystack

2005-06-22 Thread Chris Devers
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

finding needle in a haystack

2005-06-22 Thread Bret Goodfellow
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