Welcome to the Monastery | |
PerlMonks |
Re: Re (tilly) 4: Calling subroutine in a package from other perl sub.by zzspectrez (Hermit) |
on Jan 17, 2001 at 11:33 UTC ( [id://52473]=note: print w/replies, xml ) | Need Help?? |
Well, I would think it is because in sub rotate, you are assingning the data in @_ (x,y,z) to the aliases (references $x,$y,$z) indexed @_[-1..($#_-1]. However, in rotate_not, you are assinging the data (array slice) from @_[-1..($#_-1] to the array @_ and not the references. So you are overwriting the references to $x,$y,$z and not updating them. zzSPECTREz
In Section
Seekers of Perl Wisdom
|
|