++rdfield.

Without knowledge of the size of the log files all I can see is it is quite possible you are truly running out of memory. You could try, every so often, printing out your hash in scalar context ( print scalar( %CookHash ), "\n";) to see how hash buckets are being allocated. You may be near the end and that last hash allocation is sending you over the edge. There are a couple of small things you could do:

1. pre-allocate the hash if you know exactly how big the hash will be.

2. run against a small set of log files and produce some type of results for those and then run another script that sums up the initial results

3. if you have enough diskspace, use a Tie::Hash or a DB_File or database (DBI) to hold the information.

-derby


In reply to Re: Re: Again out of memory by derby
in thread Again out of memory by pradeep

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.