#you will need to define your own mutator function sub someFunc{ #removes tabs my $old = shift; my $new = $old; $new =~ s/\t//g; return $new; } %nDimHash; #this might be a HoAoHoAoAoAoS or whatever; %nDimHash = recIterate(\%recIterate, \&someFunc);