in reply to three dimensional arrays

Its always good to read docs anonymous monk above mentioned important docs. But to push to 3-dimension, it should go like this
# push @tmp into 3rd dimension push (@{$AoA[$i]},@tmp); # push @tmp cell to 3rd dimension # testing for proper info, not tested foreach (@{$AoA}) { next if (defined($_) && ref($_)!="ARRAY"); push (@{$_},shift @tmp); }
Remember to make sure the cell of array you are pushing into is either undefined or array reference.