in reply to Re: perl one liner to print a linein thread perl one liner to print a line
perl -ne'print, last if $. == 4' [download]
I prefer:
perl -ne'print and close ARGV if $. == 4' file.txt [download]
It works better with multiple files on the command line. ;-)