I did try to use Devel::Size to see if the memory actually goes down so am writing the size of the has to a log file every time I "dump" a line and the size never decreases since I have been testing it.

The here is an example. First column is line count into the file being processed, the second is the index (equivalent to $vals1) and the last the size of the %pairs hash. Here the size is 122MB for the %pairs hash ...

... 424872: e5c651161 (122480629) 424875: 6d6148148 (122481928) 424886: 108038067 (122484667) 424890: 4db238067 (122487257) 424892: 502c57487 (122488556) 424895: c53c57539 (122489855) 424896: 578757487 (122489855) 424923: 300959147 (122495178) 424928: a9bb41168 (122496165) 424936: dfc243245 (122499555) 424937: 0a9534098 (122499555) 424944: 666b34098 (122501654) 424954: 494949982 (122504073) 424956: 182939296 (122505372) 424960: c1ad46207 (122507962) 424962: 3d1249982 (122507962) 424968: 3c1336561 (122512355) 424974: b24939296 (122514993) 424987: 3c7b36561 (122517700) 424998: eb1544993 (122520311) 425005: 818a49369 (122521727) ...

In reply to Re^4: Memory utilization and hashes by bfdi533
in thread Memory utilization and hashes by bfdi533

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.