Fixed the regex
Some cosmetic changes that make the code easier to work with.
my $match_code = join(' and ', map "\$_[0] =~ /\Q$_\E/", @searchCriter +ia ); my $matcher = eval "sub { $match_code }; "; my @newArray = grep $matcher->($_), @largeArray;
In reply to Re^2: grep for array-of-strings from an array-of-strings
by diotalevi
in thread grep for array-of-strings from an array-of-strings
by spanner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |