foreach (@array) { die "Yes, key found\n" if /key/; }