that a hash of hashes is probably a better solution than the AoA one I suggested originally to represent your data not knowing what you wanted to do with it. I had warned in my first post that another data structure might be better, depending on what you intended to do with the data (which was not known at the time). And the very nice solution offered by
seems to fit exactly what you need. So, although it would be perfectly possible to generate the same type of output with an AoA, there is no point for me to continue that route. Happy to help if you have any further questions.