We don't bite newbies here... much | |
PerlMonks |
Re: Re: Perl Idioms Explained - ${\$obj->method} and @{[sort @list]}by bradb (Sexton) |
on Aug 23, 2003 at 19:24 UTC ( [id://286098]=note: print w/replies, xml ) | Need Help?? |
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 Section
Meditations
|
|