I didn't look to closely. The indenting in your code looks a bit random (hard to follow the flow). Try perltidy to fix that. But there are a few things that you should take a look at:
First, you call a function like this:
I think you really meantfor (;;) { &Prog; }
while(1) { Prog(); }
The function cleanUp calls opendir but not closedir. Looks like you do the same in Prog. One of the golden rules is: Always close handles as soon as you don't need them anymore.
In reply to Re: Memory leak!
by cavac
in thread Memory leak!
by joeymac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |