$text = "The dog is black cat is white and the fox does not like the cow or pig"; if ($text =~ /(dog|cow|pig)/) { print "match found" } #### /(dog|cat|fox|cow|pig)/g #### The dog is black cat is white and the fox does not like the cow or pig
## /(dog|cat|fox|cow|pig)/g ##
## The dog is black cat is white and the fox does not like the cow or pig