as per your suggestion, I changed the code to get the memory usage for each iteration as shown below:

############################################################## ########## memory usage of perl start of execution for iter: 0 ####### perl.exe 18124 RDP-Tcp#0 1 9,544 K ############################################################## ########## memory usage of perl end of execution for iter: 0 ######## perl.exe 18124 RDP-Tcp#0 1 9,580 K ############################################################## iteration Completed : 0 ########## memory usage of perl start of execution for iter: 1 ####### perl.exe 18124 RDP-Tcp#0 1 9,588 K ############################################################## ########## memory usage of perl end of execution for iter: 1 ######## perl.exe 18124 RDP-Tcp#0 1 9,624 K ############################################################## iteration Completed : 1 ########## memory usage of perl start of execution for iter: 2 ####### perl.exe 18124 RDP-Tcp#0 1 9,640 K ############################################################## ########## memory usage of perl end of execution for iter: 2 ######## perl.exe 18124 RDP-Tcp#0 1 9,668 K ############################################################## iteration Completed : 2
after 40 iterations memory has been increased as shown below:
########## memory usage of perl start of execution for iter: 45 ###### # perl.exe 18124 RDP-Tcp#0 1 11,308 K ############################################################## ########## memory usage of perl end of execution for iter: 45 ####### perl.exe 18124 RDP-Tcp#0 1 11,324 K ############################################################## iteration Completed : 45 ########## memory usage of perl start of execution for iter: 46 ###### # perl.exe 18124 RDP-Tcp#0 1 11,332 K ############################################################## ########## memory usage of perl end of execution for iter: 46 ####### perl.exe 18124 RDP-Tcp#0 1 11,348 K ############################################################## iteration Completed : 46 ########## memory usage of perl start of execution for iter: 47 ###### # perl.exe 18124 RDP-Tcp#0 1 11,356 K ############################################################## ########## memory usage of perl end of execution for iter: 47 ####### perl.exe 18124 RDP-Tcp#0 1 11,368 K ############################################################## iteration Completed : 47 ########## memory usage of perl start of execution for iter: 48 ###### # perl.exe 18124 RDP-Tcp#0 1 11,376 K ############################################################## ########## memory usage of perl end of execution for iter: 48 ####### perl.exe 18124 RDP-Tcp#0 1 11,392 K ############################################################## iteration Completed : 48 ########## memory usage of perl start of execution for iter: 49 ###### # perl.exe 18124 RDP-Tcp#0 1 11,404 K ############################################################## ########## memory usage of perl end of execution for iter: 49 ####### perl.exe 18124 RDP-Tcp#0 1 11,504 K ############################################################## iteration Completed : 49 ########## memory usage of perl end of execution ########### perl.exe 18124 RDP-Tcp#0 1 11,512 K ##############################################################
BTW as mentioned by Mr.Muskrat, I tried the script on linux station and the issue is not seen.


In reply to Re: Memory Usage of Perl System command by pperi2
in thread Memory Usage of Perl System command by pperi2

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.