Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: subroutine memory variable scope

by NetWallah (Abbot)
on Dec 13, 2012 at 16:29 UTC ( #1008682=note: print w/replies, xml ) Need Help??

in reply to subroutine memory variable scope

You don't seem to be using @the_inputs for anything useful, and you throw away the returned value, at least in the internal recursive calls.

Iterating over the inputs for a given recursion will take care of itself - I don't see a need to save the list for posterity.
I would suggest getting rid of it entirely, since you have shown no use for it.

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

Replies are listed 'Best First'.
Re^2: subroutine memory variable scope
by austinj (Acolyte) on Dec 13, 2012 at 17:10 UTC
    Maybe I'm not understanding. I need the @the_inputs to be returned from the subfunction - I will be using it in a later call to verify if the user supplied inputs are valid ones.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008682]
[stevieb]: At least that's what I'm working on right now. I've also been updating my automated test software Test::BrewBuild so it handles this work properly. It's not really easy meshing high level languages with low-level hardware :)
[stevieb]: this link is probably better for an overview of my test software
[stevieb]: the top-level Raspberry Pi distribution, that sucks in all sub modules. All of this software have imminent updated releases coming

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-06-25 23:18 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (572 votes). Check out past polls.