in reply to Re: Losing control of large regular expressions
in thread Losing control of large regular expressions

Note that running user defined regexes is HORRIBLY UNSAFE as the user may embed any perl code he wishes in the regex.
Nope. Not true. That's what Ilya first wanted when he introduced /(?{ })/, but that was quickly shot down by p5p because of its security hazards. Arbitrary code is only executed if either of the following cases is true: Watch:
$ perl -wle '"" =~ /(?{print "Fooled you!"})/' Fooled you! $ perl -wle 'use re "eval"; my $re = shift; "" =~ /$re/' '(?{print "Fo +oled you!"})' Fooled you! $ perl -wle 'my $re = shift; "" =~ /$re/' '(?{print "Fooled you!"})' Eval-group not allowed at runtime, use re 'eval' in regex m/(?{print " +Fooled you!"})/ at -e line 1.