Ok, let's go right back to the start. Where does your your input data come from and what does it look like? What I've seen so far suggests and array of games where each element contains an array of counts - no hashes at all!

Not that is likely to fix your problem because you still have the same nested structure, but an array of arrays does seem at first glance to be a more natural fit to what I infer your data to be. The important thing about hashes and arrays is that they only store scalar values, but a reference is a scalar so you can store a reference to an array or hash in the element of an array or hash - hence you can have nested data structures.

Note that it often helps to write a small test script that uses a little test data and prints a simple version of the results to figure out how to solve the tricky bit in isolation. Aside from making testing easier, that's also a good piece of code to use when you want input to solving the problem from others (like, oh I don't know, um Perl monks maybe).

True laziness is hard work

In reply to Re: Aaaarghh...hashes of hashes..again :( by GrandFather
in thread Aaaarghh...hashes of hashes..again :( by viffer

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.