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

TISON has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys, I have a script and an input file.
# script while ( $_ = <STDIN> ) { print; }
#input 42 0 1042
and the I run perl script < input and expect it should exit after read "0", but the script print "42\n0\n1024\n". When $_ = <STDIN> read "0", isn't it evals to a false value and then exit?