my %hash1 = ('one' => 'un', 'two' => 'deux', 'three' => 'trois'); # fixed my @ary = ('one', 'two', 'four'); # variable #----------------------------------------- for (keys %hash1) { my $loc = $_; my $mat = 0; for (@ary) { $mat = 1 if ($_ eq $loc); } delete $hash1{$loc} unless $mat; } for (keys %hash1) { print "**$_** => **$hash1{$_}**\n"; } #----------------------------------------- my %hash2 = map { $_ => $hash1{$_} if (defined $hash1{$_}) } @ary; for (keys %hash2) { print "**$_** => **$hash2{$_}**\n"; } #-----------------------------------------