use strict; use warnings; catches one error - a missing paren.
I'd build $negative_regex in one pass:
my $negative_regex = join '|', map { s/^-//, $_ } @$negative_criteria;
And test both regexes in one pass:
foreach(@$data) { push @$results, $_ if /$match_regex/ && !/$negative_regex/; }
In reply to Re: General Advice
by hbm
in thread General Advice
by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |