It would have been better if => had imposed scalar context on both of its sides (and string context on its left side).
This will happen in Perl6 (last I heard, as near as I can tell) but, unfortunately, people were too quickly off using => for all manner of silly things that would break if sanity were inflicted upon them so backward compatability prevents the fixing of this "gotcha" in Perl 5.
- tye
In reply to Re: wantarray - surprise behaviour (=>)
by tye
in thread wantarray - surprise behaviour
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |