in reply to Data cube in Perl?

Something tells me you have a background in the languages Lucid and Field (intensional programming languages).

Anyway, reforming, navigation, definition and querying of nested variable-type Perl structures can be done by the CPAN module Data::DRef.

Navigation,definition and querying (more complex than DRef) can be done by the CPAN module Stone, which is a part of Boulder, all written by Lincoln Stein (author ID: LDS)

Both products provides means of iterating over the entire data structure and performing operations on the retrieved results.