Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: scoping large arrays - newbie Q

by samtregar (Abbot)
on Jun 18, 2002 at 07:06 UTC ( [id://175296]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: scoping large arrays - newbie Q
in thread scoping large arrays - newbie Q

Can I choose point C? Here's an alternative:

{ my @bigarray = ("insert", "a very", "long list here"); # c sub mySub { for (@bigarray){ # do stuff with array } } }

This keeps @bigarray private to the subroutine but only initializes it once. You get the best of both worlds at no added cost!

-sam

Replies are listed 'Best First'.
Re: Re: Re: Re: scoping large arrays - newbie Q
by shotgunefx (Parson) on Jun 18, 2002 at 09:01 UTC
    I second that.

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://175296]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-19 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found