- or download this
perl -ne "$. ==1 and print;" filename.txt
- or download this
perl -e "print scalar <>;" filename.txt
- or download this
perl -ne "print and last;" filename.txt
- or download this
perl -ne "last; END{print}" filename.txt
- or download this
perl -ne "die $_;" filename.txt
- or download this
perl -pe "$. > 1 and last;" filename.txt