or alternatively:
open my $tenlines, "|head myfile.txt"; print $tenlines;
In reply to Re: Reading in the first 10 lines of a file
by pvaldes
in thread Reading in the first 10 lines of a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |