perly_newbie has asked for the wisdom of the Perl Monks concerning the following question:
print "Program Running"; open FILE, "<Readme.txt" or die $!; my @lines = <FILE>; #while (lines = <FILE>) { print "Line is"; my $one= $lines[1]; print "first element only"; print $one; my @elements; ($elements[0],$elements[1],$elements[2],$elements[3],$elements[4])=spl +it(/ */,$one); print "after splitting"; print $elements[4]; } close FILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Splitting each line into an array from file
by toolic (Bishop) on Jan 06, 2010 at 00:16 UTC | |
|
Re: Splitting each line into an array from file
by Marshall (Canon) on Jan 06, 2010 at 05:07 UTC |