in reply to How to code a complex AoH?

Welcome to the Monastery, iatros!

I'm just about to run out the door so I don't have time for a thorough review, but one thing immediately popped out:

'points' => @points

That's what is most likely causing the issue, because that really looks like this:

points => element1, element2, element3

In essence, assigning an array to a hash key will attempt at adding more key, value pairs. You need to assign a reference to the array instead:

points => \@points

Also note that in a hash, unless there are special characters involved, the "fat comma" (ie =>) will auto-quote the left-hand-side, so you don't have to in your hash creation. This is why I left the single quotes off of the key in the example above. Just makes for a bit more cleaner code.

Replies are listed 'Best First'.
Re^2: How to code a complex AoH?
by iatros (Novice) on Mar 30, 2017 at 17:18 UTC
    Thanks for the reply and the tip with the auto-quote feature. Definitely more readable and less typing. Thx -HM-