in reply to Re: subroutine calls itself
in thread subroutine calls itself

Thats good to know. I was just hoping that my program wouldn't suck up all the resources on my server. Thanks!

Replies are listed 'Best First'.
Re^3: subroutine calls itself
by ikegami (Patriarch) on Jan 09, 2009 at 17:50 UTC

    I just wanted to clarify something. When I said there's no performance issue, I meant compared to calling the same number of non-recursive subs. Calling subs in general is an expensive operation in Perl, but that's not related to whether the sub is recursive or not.

    So if you have no qualms with calling a sub seven times, you should have no qualms about calling a sub that recurses six times instead.