If your arrays are numeric you can greatly benefit from using PDL (Perl Data Language). Just use as many dimensions as you want in a single "piddle", i.e. a PDL variable.
Check the documentation in the PDL web page. Also there is a new version coming up!