No really, don't.
Any code you call from inside a (?{ ... }) absolutely, cannot use regular expressions at all. Unless you control every part of the code being run inside the expression, the code isn't safe. I expect that you're using DBI and a driver module to work with your database. That's all code that you don't control and that probably uses regular expressions. None of that can be called from within a (?{ ... }) block.
Examine the pre-forking used in Regexp::Approx - Use fuzzy regular expressions to see how I fork during INIT and then run the unsafe code in a separate process. This is the only general method which allows you to do this sort of thing.
In reply to Re^2: regex-codeblock calling subroutines?
by diotalevi
in thread regex-codeblock calling subroutines?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |