in reply to Aaaarghh...hashes of hashes..again :(
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).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Aaaarghh...hashes of hashes..again :(
by viffer (Beadle) on Mar 23, 2011 at 04:08 UTC | |
by GrandFather (Saint) on Mar 23, 2011 at 04:49 UTC | |
by viffer (Beadle) on Mar 23, 2011 at 23:32 UTC |