in reply to passing multi dimensional hashes into a sub

You can actually pass the hash of arrays by value without any problem, as if it were a single-dimension hash (in a sense it is a simple hash in which the values happen to be array refs):
$ perl -MData::Dumper -e ' my %h = (tim => [ 4, 7], joan => [5, 8], fr +ed => [8, 3]); > proc(%h); > sub proc { > my %h_sub = @_; > print Dumper \%h_sub; > }' $VAR1 = { 'tim' => [ 4, 7 ], 'joan' => [ 5, 8 ], 'fred' => [ 8, 3 ] };
Now, of course, this implies copying the (top level) hash. If it is large, you might want to use passing by ref to avoid the overhead of making such a copy. But the structure of the data does not prevent you from passing the hash by value.