in reply to Print not printing
As you can see, perl guesses from the whitespace after print and its first argument that you intended a unary plus, instead of an addition between arguments. It then decided that $a must be an object (like a file handle) for object indirect syntax.U:\proj>perl -MO=Deparse -e "print $a + $b" print $a + $b; -e syntax OK U:\proj>perl -MO=Deparse -e "print $a +$b" print $a $b; -e syntax OK
Personally, I wish Deparse was even more clear about that:
U:\proj>perl -MO=Deparse -e "print $a +$b" $a->print $b;
--
[ e d @ h a l l e y . c c ]
|
|---|