http://www.perlmonks.org?node_id=484332


in reply to Re: A refactoring trap
in thread A refactoring trap

The second while however, will stop as soon as it finds an empty line

Just to test your assertion:

while (my $line = <DATA>) {print $line}; __DATA__ one two three four

results in

one

two
three

four

It seems that empty lines don't break the loop at all.