in reply to Re^2: Several stupid questions about subs
in thread Several stupid questions about subs

my (...) = @_; is a very common way of getting args. I can't believe it wasn't mentioned.

sub frobnicate { my ($foo, $bar, @remainder) = @_; print $remainder[0] == 3 ? 'yum' :'eew'; }

Replies are listed 'Best First'.
Re^4: Several stupid questions about subs
by fidesachates (Monk) on Apr 13, 2011 at 17:56 UTC
    Probably because the OP was asking about getting variables from the sub back to the scope from which it was called and this is the other way around.
Re^4: Several stupid questions about subs
by Anonymous Monk on Apr 13, 2011 at 18:56 UTC

    That code was in reply to the reply asking what my $var = shift; is all about