in reply to configurable regex match

You can't do that. You cannot interpolate variables in random places in the program, and assume the parsing isn't going to happen until runtime. This is Perl, not a shell.

But this should work:

if ($string =~ /(?$mod)$regex/) { ... }

Replies are listed 'Best First'.
Re^2: configurable regex match
by perl_fan (Novice) on Aug 13, 2009 at 17:47 UTC
    Thanks it worked! You are a King!!