while (defined($symbol = <IN>))
With this particular construct, Perl automatically adds the defined(), so you can safely omit it if you prefer brevity.
$ perl -MO=Deparse -e'while ($symbol = <IN>) { chomp($symbol) }' while (defined($symbol = <IN>)) { chomp $symbol; } -e syntax OK
In reply to Re^2: perl leaving out the last value?
by Eliya
in thread perl leaving out the last value?
by perllearner007
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |