Think about Loose Coupling | |
PerlMonks |
Re^4: Simple Pass By Referenceby tomazos (Deacon) |
on Jul 26, 2005 at 00:27 UTC ( [id://478029]=note: print w/replies, xml ) | Need Help?? |
I kind of wanted to use a local alias for $_[0], rather than have to use a reference that I have to remember to dereference everywhere.
I guess I just want to say:
Just to give $_[0] a meaningful name in the context of the subrountine, such that $var_in_sub and $_[0] are the same thing. In the same way as $var_elsewhere and $_[0] are the same thing when calling alter_var($var_elsewhere). I guess this can't be done in Perl, without using references and dereferencing - which is fine. No big deal. -Andrew.
In Section
Seekers of Perl Wisdom
|
|