in reply to Re: grep for array-of-strings from an array-of-strings
in thread grep for array-of-strings from an array-of-strings
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;
|
|---|