C:\strawberry>perl -nE "say $." README.txt | head 1 2 3 4 5 6 7 8 9 10 C:\strawberry> #### # @ARGV may have more than one file in it while () { print "$.:$_\n"; } continue { close ARGV if eof; }