the same kind of match as the other filters, and you couldn't use
parts of the match in the folder name. Fix.
foreach $contents (@{$headers{lc($header)}}) {
foreach $pair (@filter) {
($match, $expression) = @$pair;
foreach $contents (@{$headers{lc($header)}}) {
foreach $pair (@filter) {
($match, $expression) = @$pair;
- if ($contents =~ /$match/) {
- return $expression;
+ if ($contents =~ /$match/i) {
+ if (eval "\$result = \"$expression\"") {
+ return $result;
+ }