in reply to problems with split
# type value value2 # 503 1093 4395 # load the data @file = <FILE>; # or use a while (defined(my $line = <FILE>)) { loop for my $line (@file) { # for is the same as foreach my @fields = split (/\s+/, $line); # @file was being reused print "$fields[2]\n"; }
--
integral, resident of freenode's #perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: problems with split
by Anonymous Monk on Mar 03, 2003 at 18:23 UTC | |
by integral (Hermit) on Mar 03, 2003 at 18:28 UTC |