On 2011-05-15 18:28, Mike McClain wrote:
In reading in a file of space separated columns of numbers
and stuffing them into an array, I used:
while( my $line =$FH )
{ my @arr = split /\s+/, $line;
push @primes_array, @arr;
}
but kept getting empty array entries until
I am trying to get all the 6 letter names in the second field in DATA
below, eg
BARTON
DARWIN
DARWIN
But the script below gives me all 6 letter and more entries.
What I read says {6} means exactly 6.
What is the correct RE?
I have solved the problem my using if (length($data[1]) == 6 ) but
On 5/16/11 Mon May 16, 2011 3:44 PM, Owen rc...@pcug.org.au scribbled:
I am trying to get all the 6 letter names in the second field in DATA
below, eg
BARTON
DARWIN
DARWIN
But the script below gives me all 6 letter and more entries.
What I read says {6} means exactly 6.
\S{6} will
On Sun, May 15, 2011 at 11:51:35AM -0700, John W. Krahn wrote:
snip
split ' ', $line;
John
Smacking my forehead in chagrin. :-)
You're absolutely right John, I just didn't read far enough.
Thank you,
Mike
--
Satisfied user of Linux since 1997.
O ascii ribbon campaign - stop html mail -