Update: I realized that the 'and' case is much more difficult that the 'or' case that I presented. I would use eval for it: my $criteria = join "/ and /", @searchCriteria; $criteria = "/$criteria/"; and then use it like this grep {eval $criteria}. Which is just your second code dynamically generated.
In reply to Re: Re: grep for array-of-strings from an array-of-strings
by zby
in thread grep for array-of-strings from an array-of-strings
by spanner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |