in reply to Re^2: grep with looped tests
in thread grep with looped tests
Ah I always forget that List::Util (which is core) has now any , too!
(I'm still hooked on List::MoreUtils , see next answer :)
> my @res = grep {my $line = $_; !defined first {$line =~ $_} @re } @data;
But I think you'd certainly prefer any over first to avoid !defined ! :)
update
though first was and any wasn't part of my 5.10 distribution!
Cheers Rolf
(addicted to the Perl Programming Language)
In Section
Seekers of Perl Wisdom