in reply to Re: Re: Re: Memory Use and/or efficiency passing scalars to subs
in thread Memory Use and/or efficiency passing scalars to subs
Anyhow, I discoved that the only sure way of not making a copy that I know of is to use $_[0],$_[1], directly in the subroutines.
For me the problem became one of readability when I had 3 or more passed references and a fair amount of code in a single sub. So, I tried to find a way to use named vars instead of the $_[0], $_[x] approach which was getting confusing and leading to stupid bugs.
Any suggestions on a good way to accomplish that would be appreciated.
BTW: The code I listed in the original approach does not appear to make a copy of the scalars, but I can honestly say I am not qualified at this point to say its a fact. :-) Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Memory Use and/or efficiency passing scalars to subs
by Limbic~Region (Chancellor) on Aug 30, 2003 at 17:34 UTC |