for my $file_name ( keys %{ $hash_name eq 'dat' ? \%dat_mapping : \%eng_mapping } ) { ... }