http://qs321.pair.com?node_id=529544


in reply to Re^2: Can you read a false value from a file?
in thread Can you read a false value from a file?

When you write while ($scalar = <FILEHANDLE>) { ... }, perl takes care of the test for definedness for you:
$ perl -MO=Deparse -e 'open $fh,"foo.txt"; while (my $line = <$fh>) { +print $line }' open $fh, 'foo.txt'; while (defined(my $line = <$fh>)) { print $line; } -e syntax OK