foreach $line (@file) { print $line."\n"; } #### my @file; while (<$file>) { push(@file, "$_\n"); }