@matches = grep {$hash{$_} eq "correct_value"} @array; if (@matches){ print "Success" } else { warn "no match" }