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