Smylers wrote:
Dave Whipp writes:So eseentially, given (@foo) means the same as Perl5 for ([EMAIL PROTECTED])Just wondering: should "given @foo {...}" alias to $_, or @_?I'd expect it to alias to C<$_>, on the grounds that everything always aliases to C<$_>. What's the argument for it being C<@_>?
Yes, my expectation would be C<$_>, too. But then I started thinking that it might be nice to preserve the sigil; and that binding to C<@_> is what subs do, so it's not entirely unprecedented. But yes, the use-case of given/when is based on the idea of creating a scalar alias to the collection.
