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
In reply to Re: Building three-dimensional array using push
by zejames
in thread Building three-dimensional array using push
by punch_card_don
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |