If I may be so bold as to reel everyone back in to the original question, my script still seems to be running out of memory after about an hour. If anyone would like to continue to (needlessly) debate the differences between for(;;) and while(1), go to my previously posted question Infinite Loop Question and go wild. I have tried:

closedir DIR1;

in both subroutines after I opened and read directories, and I also tried emptying out the @rmtDirList at the end of the Prog subroutine:

@rmtDirList = ();

but neither has worked yet. As I said, it is stumping me because a very similar version of the script has been running nonstop for about a three weeks now, and I never ran into this problem when developing it. In fact I am testing the problem script on exactly the same server machine that the other is currently running! Any other insights or suggestions would be greatly appreciated. Thanks!!


In reply to Re: Memory leak! by joeymac
in thread Memory leak! by joeymac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.