my @matches = qw /with this please/; OUTER: while (my ($key, $value) = each %hash) { foreach my $match (@matches) { if ($match eq $value) { print "$key: $value"; last OUTER; } } }