if (grep $_ == $x, @array) { print "Found $x in the array!\n"; }