basically copies all parameters passed to the array from @_ to @blah. It leaves @_ intact (for other processing if required).my (@blah) = @_;
will REMOVE the first element of the parameter array @_ and place it in the $blah scalar. 'shift'ing will shorten the @_ array. This, as gaal mentioned, modifies @_.my $blah = shift;
In reply to Re: Subroutines: @_ and shift
by mlh2003
in thread Subroutines: @_ and shift
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |