in reply to How do pack a regular expression in a variable?
in thread Answer: How do pack a regular expression in a variable?

I came up with something that seems to work - using an eval to evaluate a string containing the regular expression variable...
FEOUTER: while ($tkey = each(%targf)) { # Apply Search and Exception to each log line $found = 0; foreach $scline (@$srch_except) { # Split string intonext FEOUTER; qualifier and text $ttype = substr($scline, 0, 1); $ttext = substr($scline, 1); $eval_cd = "\"$tkey\" =~ $ttext"; if ($ttype eq '!') { if (eval "$eval_cd") { $targf{$tkey} = "1:0"; next FEOUTER; } } elsif ($ttype eq '&') {