in reply to Re^3: CGI Action call
in thread CGI Action call

My undestanding:

my $a = shift; 1st item my $b = shift; 2nd item (if exits etc since it was bumped up to top by + pervious shift. my ($a, $b) = @_; my $a = $query->param('a'); my $b = $query->param('b');

These are all the same.

Replies are listed 'Best First'.
Re^5: CGI Action call
by Corion (Patriarch) on Mar 12, 2018 at 21:09 UTC

    What you wrote above has nothing to do with the assignment of subroutine parameters.

    shift will only move one element from the parameter list. A hash will occupy multiple slots in the parameter list. You need to learn about how Perl passes parameters in subroutine calls.

    param(...) is only for CGI parameters and has no bearing on subroutine parameters.

      param(...) is only for CGI parameters and has no bearing on subroutine parameters.

      Winder why I thought or assumed that?