in reply to Using Shift with Parameters in a subroutine

perlintro#Writing subroutines, Modern Perl a loose description of how experienced and effective Perl 5 programmers work....You can learn this too.
my( $first, $second, $last ) = @_;

Replies are listed 'Best First'.
Re^2: Using Shift with Parameters in a subroutine
by perlron (Pilgrim) on Oct 20, 2014 at 09:17 UTC
    thanks.! :D
      If you just want to scoop the first couple of parameters, you can do something like this:
      sub f { my ($x,$y,@z) = @_; print "$x\n$y\n@z\n"; } f("first","second","third","fourth");
      Prints:
      first second third fourth