in reply to Creating and Accessing 3-D array

If your specific performance requirements, etc., will allow it, I like to look upon tasks like this one in the most abstract way possible.   For instance, creating (or using from CPAN) a class that accepts a list as the “key” under which data may be stored.   Such that it does not matter how long the list (how many “dimensions” there are...)

A crucial consideration will be:   do you, or do you not, need to iterate through the stored data’s “dimensions.”   Another will be, is the data “sparse,” and is the dimensional space in which it is stored of a fixed or known shape and size.   Earlier programming languages had nothing more sophisticated than “multi-dimensional arrays” and maybe malloc(), obliging you to think almost-immediately (and very, very physically) about how you were going to store the data.   Perl and its brethren are very different in this regard, and it is very desirable to look for ways to express your problem so as to exploit these differences.