Yes. This is a good explanation of the diferences between shift and accessing @_ directly. After I shift, the alias is gone from @_. So its obvious I cant modify the original value.
However, things dont exactly work like this though. And an alias is not the same as a reference. Correct? Because if test($x,$y,$z) does @_ = (\$x, \$y, \$z) then in then in the code you would have to dereference the variable after you shift them to access them. They would be references not scalar data. my $x = shift @_; print $$x;
zzSPECTREz
NOTE: I appreciate your responses. You allways get me thinking.In reply to Re: (tye)Re: Calling subroutine in a package from other perl sub.
by zzspectrez
in thread Calling subroutine in a package from other perl sub.
by Anonymous Monk
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |