foreach my $file_name (key (sub { if ($hash_name eq 'dat') { return \%dat_mapping; } else { return \%eng_mapping: } } ) { print "blah\n"; }