I don't have an answer. It's just one more example of perl getting confused by ambiguous syntax. For some reason that I don't understand, when parsing the third print statement, perl chooses to interpret $a as a filehandle (which is not open) and the + as a unary operator. But adding a + in front of the $a as well clears up that confusion.
% perl -MO=Deparse,-p -e 'print $a + $b;print $a+$b;print $a +$b;print + +$a +$b' print(($a + $b)); print(($a + $b)); print($a $b); print(($a + $b)); -e syntax OK
the lowliest monk
In reply to Re: Print not printing
by tlm
in thread Print not printing
by perl_lover
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |