$ cat file.txt | perl -ne '(1..10)&&print'