$string = "abcd"; # $input = "d"; OK # $input = "("; ERROR if($string =~ m/($input)/){ print "The string is $string\n"; }