in reply to Re^3: Simple Pass By Reference
in thread Simple Pass By Reference
I guess I just want to say:
alias $var_in_sub = $_[0];
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Simple Pass By Reference
by sk (Curate) on Jul 26, 2005 at 00:57 UTC | |
|
Re^5: Simple Pass By Reference
by PodMaster (Abbot) on Jul 26, 2005 at 00:52 UTC | |
by tomazos (Deacon) on Jul 26, 2005 at 01:20 UTC |