in reply to
how to print first 5 lines of a file
Since
-p
generates a while loop you can also do this:
perl -pe 'last if $. > 5' filename
[download]
--
John.
Comment on
Re: how to print first 5 lines of a file
Download
Code
In Section
Seekers of Perl Wisdom