in reply to three dimensional arrays

Some rules: 1) the first argument of push must have a @ sigil. 2) Whenever I have a sigil followed by a variable name in Perl, I may replace the variable name with a block that returns a reference of the appropriate type.

So, what I want is:

push @somearray, [@tmp];
But what should somearray be? Well, it should be a block returning a reference to the right array - and what is that array? It's $AoA [$i]. So, replacing somearray with the block, we get:
push @{$AoA [$i]}, [@tmp];

Abigail