[EMAIL PROTECTED] wrote:
> Thanks Jeff. I hope to try this out later today. I thought I had the
> solution earlier this morning, but I ran into a problem. I hope this will
> solve it ! Thanks again.
>
> >apples San Antonio Fruit
> >oranges Sacramento Fruit
> >pineappl
TED]
To
[EMAIL PROTECTED]
cc
[EMAIL PROTECTED]
Subject
Re: Need help with a regex
On Jan 23, [EMAIL PROTECTED] said:
>This newbie needs help with a regex. Here's what the data from a text
>file looks like. There's no delimiter and the fields aren't evenly spaced
&g
On Jan 23, [EMAIL PROTECTED] said:
>This newbie needs help with a regex. Here's what the data from a text
>file looks like. There's no delimiter and the fields aren't evenly spaced
>apart.
>
>apples San Antonio Fruit
>oranges Sacramento Fruit
>pineapples Honolulu
The bottom line is that I
really appreciate your help.
"Tim Johnson" <[EMAIL PROTECTED]>
01/23/2004 01:32 AM
To
"Tim Johnson" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]>
cc
Subject
RE: Need help with a regex
Ooh. That
etween the two outside spaces.
-Original Message-
From: Tim Johnson
Sent: Thu 1/22/2004 9:31 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc:
Subject: RE: Need help with a regex
Try this o
On Fri, Jan 23, 2004 at 12:01:13AM -0500, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
> This newbie needs help with a regex. Here's what the data from a text
> file looks like. There's no delimiter and the fields aren't evenly spaced
> apart.
>
> apples San Antonio Fruit
> orang
Try this on for size:
#
use strict;
use warnings;
my @cities = ();
open(INFILE,"myfile.txt") || die "Couldn't open myfile.txt for reading!\n";
while(){
$_ =~ /^\S+\s+(\S+)/;
push @cities,$1;
}
#do something to @cities
#
which basically means t