http://www.perlmonks.org?node_id=1002562


in reply to Re^2: Putting the stringified Regexp object into code
in thread Putting the stringified Regexp object into code

How are you embedding? This sounds like something you should be solving using modules if you need to share the result among multiple scripts. But as I said, the code should stand as is. I would point out that the qr in $code = "if (\$data =~ qr/$re/) { blah() }"; is unnecessary.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.