in reply to Using Shift with Parameters in a subroutine

Hi Ron, if I have correctly understood your request, you can get multiple parameters in this way
sub foo { my ($query_ref, $session_ref) = @_; }
. Generally speaking, if you have 10 parameters, and you call mysub(1,2,3,4,5,6,7..10), you can take the parameters in various ways
sub mysub { my a = shift; #1 my $b = shift; #2 ... and so on
sub mysub { my @p = @_; #the array 1,2,3....10 ...
and in your case
sub mysub { my ($a, $b, $c, ....$j) = @_; #$a = 1, $b = 2, ... $j = 10
I hope you help.

Replies are listed 'Best First'.
Re^2: Using Shift with Parameters in a subroutine
by perlron (Pilgrim) on Oct 20, 2014 at 12:08 UTC
    thanks DanBev. !