in reply to Memory leak!

Is this the problem?

push (@rmtDirList, @currentDirList);

I see nothing which removes entries from @rmtDirList.

You could work around this by passing variables to Prog() from within your infinite loop and treating them as lexicals within the function. You're far better off doing that.


Improve your skills with Modern Perl: the free book.

Replies are listed 'Best First'.
Re^2: Memory leak!
by joeymac (Acolyte) on Dec 12, 2011 at 19:47 UTC

    Thanks for the advice. I emptied out some of the arrays, as can be seen in the code, but this is one I must have missed. I will add:

    @rmtDirList = ();

    along with the others and see if it has an effect on the problem.