John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
But for even heavier use, such as in a long loop, it would be even more efficient to copy the value to a local variable, and when done, copy the new value back.
But, I'm wondering if there is a nice way to simply make the local variable alias the other one without having to explicitly dereference it each time. For a single value, a dummy for loop that only executes one iteration can do exactly that. But is there a more general way?
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Aliasing Variables
by tye (Sage) on Jul 22, 2001 at 10:51 UTC | |
by John M. Dlugosz (Monsignor) on Jul 22, 2001 at 11:01 UTC | |
by miyagawa (Chaplain) on Jul 22, 2001 at 11:45 UTC | |
by John M. Dlugosz (Monsignor) on Jul 22, 2001 at 22:11 UTC | |
by miyagawa (Chaplain) on Jul 23, 2001 at 09:50 UTC | |
| |
|
(MeowChow) Re: Aliasing Variables
by MeowChow (Vicar) on Jul 22, 2001 at 11:51 UTC | |
by John M. Dlugosz (Monsignor) on Jul 22, 2001 at 22:05 UTC | |
by MeowChow (Vicar) on Jul 22, 2001 at 23:40 UTC | |
by John M. Dlugosz (Monsignor) on Jul 23, 2001 at 02:50 UTC | |
|
Re: Aliasing Variables
by petral (Curate) on Jul 22, 2001 at 05:04 UTC |