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
my $scalar; print $scalar "sausage";
and
my %hash = ( x => 'XYZ' ); print $hash{x} "sausage";
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 limitation in feature of Perl, and we're just going to have to live with it.
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 reply to Re: Using ternary operator as lvalue in push
by FunkyMonk
in thread Using ternary operator as lvalue in push
by oha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |