in reply to Subroutines: @_ and shift
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;
|
|---|