in reply to Re: Oh where has my memory gone?
in thread Oh where has my memory gone?

Hello, THANK YOU SO MUCH FOR THE QUICK REPLY AND YES I'M YELLING IT! But could I also just do...
sub manager(){ while(1){ #same as before... } }
To reduce memory usage? With or without the need for undef?

Replies are listed 'Best First'.
Re^3: Oh where has my memory gone?
by bart (Canon) on Jun 09, 2008 at 19:43 UTC
    Yes that'll do the same as BrowserUK's quick solution: replace the endless recursion with a loop.

    Perl doesn't treat tail recursion as speacial, so it's still bad. As in the original code.

Re^3: Oh where has my memory gone?
by massa (Hermit) on Jun 09, 2008 at 19:43 UTC
    Yes. Lose the undefs, they are doing nothing.