# script while ( $_ = <STDIN> ) { print; }
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?#input 42 0 1042
In reply to truth in while condition by TISON
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |