Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
As you've discovered, recursion isn't very time or space efficient, compared to iteration. However, don't toss it out of your toolbox completely - it's very useful dealing with bounded data-structures where you know in advance the maximum depth. I use recursion all the time when dealing with small trees (XML parse trees, category hierarchies, etc.).
The intimate relationship between recursion and iteration is a major theme in Higher Order Perl. Pick up a copy and blow your mind today! -sam In reply to Re: Misunderstanding Recursion
by samtregar
|
|