it prints prints empty newlines for every line in the file (presumably after printing the ten lines I want).my $counter; print"TOP\n"; while( (<>) && counter <10){ $counter++; print"$_\n"; } print "BOTTOM";
In reply to peeling the top 10 lines from a file by jjohhn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |