Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2014-07-22 19:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (126 votes), past polls