in reply to Re: scoping large arrays - newbie Q
in thread scoping large arrays - newbie Q
Thank you for the response. I do know about using references, I have used them here and there to pass something to a function that was not in that function's scope. That's not really what I am looking for here. I was not clear enough. I just really wonder whether it is more efficient to set up my array at point A, or point B in the pseudocode below which is trying illustrate my question:
#!/usr/bin/perl -w use strict; my @bigarray = ("insert", "a very", "long list here");#point A my $thing1 = mySub(); my $thing2 = mySub(); #...etc - using mySub repeatedly sub mySub { #point B - should I declare my @bigarray here instead, and why? for (@bigarray){ #do stuff with array } }
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) 3Re: scoping large arrays - newbie Q
by jeffa (Bishop) on Jun 18, 2002 at 05:39 UTC | |
Re: Re: Re: scoping large arrays - newbie Q
by samtregar (Abbot) on Jun 18, 2002 at 07:06 UTC | |
by shotgunefx (Parson) on Jun 18, 2002 at 09:01 UTC |
In Section
Seekers of Perl Wisdom