" I think you need to change the extension of ur image file to either JPG for processing the file "
Why do you think that? Isn't a file just a file, even on Windows? All the extension does is allow windows to know what viewer/editor/or program to associate and/or launch when you double click that file? I don't see how the extension could affect reading the file...

"empty the arrays or hash or the any data structure whichever you are using after using it rather than over witing it."
Is this what you mean by that?
my @images = qw(file1.png file2.png file3.png); @images = (); @images = qw(file4.png file5.png file6.png);
If so, why is that better than this?
my @images = qw(file1.png file2.png file3.png); @images = qw(file4.png file5.png file6.png);

Update:
Perhaps you meant that you need to empty your data structure periodically if you are pushing or unshifting onto it, as it would continue to grow otherwise?

In reply to Re^2: Out of memory issue by desemondo
in thread Out of memory issue by ralphch

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.