$p = '4+5*6'; $re = qr/$p/; $str =~ m/$re/; # Still doesn't. $p = 'm/a/'; $re = qr/$p/; $str =~ m/$re/; # Still doesn't. $p = 's/a/b/'; $re = qr/$p/; $str =~ m/$re/; # Still doesn't.