http://qs1969.pair.com?node_id=106857


in reply to Print last line in a file

I've always done it as one-liner:

perl -ne '$last=$_; END{print $last}'

Similar in spirit to tachyon's reply.