in reply to Building three-dimensional array using push
while (<FILE>) { $line = <FILE>; ... } close(FILE);
The <FILE> reads one line of the file each time. So with that code, $line is set with the data of only one line where two are read...
You should use
:my $line while ($line = <FILE>) { ... } close(FILE);
HTH
|
---|