When printing try:
foreach $line (@file) { print $line."\n"; }
Alternatively, you could change Mr. Muskrat's code as follows:
my @file; while (<$file>) { push(@file, "$_\n"); }
In reply to Re^3: reading files
by Ionizor
in thread reading files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |