@arr=(cool,guy,here); $str1="I am cool"; if($str1 =~ m/@arr/){ print "Matched"; }