Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Using ternary operator as lvalue in pushby FunkyMonk (Chancellor) |
on Aug 01, 2007 at 09:34 UTC ( [id://630002]=note: print w/replies, xml ) | Need Help?? |
Having read this thread, I think I would describe this as a case of The Price We Pay For Perl's Magic. The only other place I think of where I've seen something similar, is on a magic print-to-filehandle. Compare
and
The first compiles but the second generates a String found where operator expected compile time error (print tells you how to get round this problem, if you're interested).
I think this is a update: oha makes a fair point, and one that I agree with. It was a poor choice of words on my part. Post updated
In Section
Seekers of Perl Wisdom
|
|