$s = "match"; $re = qr/$s/; print "yup" if $something =~ $re; #### $s = "match"; print "yup" if $something =~ /$s/;