in reply to problem with array
...If you want individual arrays, you'll have to get fancier:while(<FILE>){ chomp; push @data, split(/,/,$_); }
This will make an array of arrays, accessible as such:my @data = (); while(<FILE>){ chomp; push @data, [ split(/,/,$_) ]; }
print data[0][0]; # prints the first element of the first line print data[4][3]; # prints the fifth element of the fourth line
|
|---|