Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 browsing the Monastery: (7)
As of 2015-10-06 22:40 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (163 votes), past polls