in reply to How would I print the last element of a loop?
If you want to print only the last line of a file, you could do
while (<>) { print if eof } [download]