Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Deep recursion problem

by jethro (Monsignor)
on Oct 21, 2011 at 15:10 UTC ( #932924=note: print w/ replies, xml ) Need Help??

in reply to Deep recursion problem

DB:: is AFAIK the namespace of the debugger, so only the debugger will use that variable. If you want to recurse deeply, then just use "no warnings 'recursion';", as you already found out. Such a warning would have no value to you when you want to do arbitrarily deep recursion anyway.

And if you really need a limit, count the recursion yourself with an additional parameter (clunky but effective):

sub size_of_an_array { my($i, @array) = @_; ... return(++$i, 1 + size_of_an_array(@array));

Comment on Re: Deep recursion problem
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (17)
As of 2015-11-24 22:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (663 votes), past polls