in reply to Detecting last line and blank line

See eof for last line.

An empty line means $line eq "" after chomp $line

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!