That's interesting, because defining an AoH or HoA in Perl is almost identical to how you would do it in Javascript, which is to say it looks a lot like JSON.
If it was the access and assignment semantics, the normal case is also fairly straightforward; use curly braces for hash/dict keys, square brackets for array indices.
E.g.
my %data = (
foo => [
{ bar => 10, baz => 12 },
{ bar => 20, baz => 13 },
{ bar => 30, baz => 14 },
],
);
print $data{foo}[2]{bar}; # 30
push $data{foo}, { bar => 40, baz => 15 };
Given, using array and hash references with the built-in push,pop,shift,unshift,keys,values and each used to require some annoying dereferencing that could be confusing.Do you still find that confusing?