in reply to How do I test for a blank line when reading from a file?

while (<>) { print __LINE__ " | This line is blank\n" if /^$/; }
A little friendlier output

Originally posted as a Categorized Answer.