To be more precise, the \ operator gives its argument list context, which may surprise many people (it did me).
Why would this surprise you? :)
If I ask for a reference to an array that contains ('foo', 'bar', 'baz'), I expect a reference to an array that has three elements in it, not the number 3 (as would be the case if \ provided scalar context for its arguments.)
In reply to Re: Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}
by bradb
in thread Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}
by broquaint
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |