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


in reply to use of built-in function in regex...

Yes. You can use (?{CODE}) inside your regular expression. For more on this please look in to http://perldoc.perl.org/perlretut.html#A-bit-of-magic:-executing-Perl-code-in-a-regular-expression.

Regards,
Murugesan Kandasamy
use perl for(;;);