in reply to hashes: testing for the presence of a key

use Data::Dumper; my @array = qw/ foo bar baz quux /; my %hash = qw/ foo one quux two /; my @found = map { $array[$_] . $hash{$array[$_]} } grep { exists $hash{$array[$_]} } 0 .. $#array; print Dumper(\@found); __output__ $VAR1 = [ 'fooone', 'quuxtwo' ];
See. the exists, map and grep docs for more info.
HTH

_________
broquaint