in reply to Re: Using Shift with Parameters in a subroutine
in thread Using Shift with Parameters in a subroutine

thanks.! :D
  • Comment on Re^2: Using Shift with Parameters in a subroutine

Replies are listed 'Best First'.
Re^3: Using Shift with Parameters in a subroutine
by bibliophile (Prior) on Oct 20, 2014 at 14:09 UTC
    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