Perl: the Markov chain saw | |
PerlMonks |
Re^3: grep with looped testsby LanX (Saint) |
on Jun 06, 2014 at 16:03 UTC ( [id://1089053]=note: print w/replies, xml ) | Need Help?? |
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 ! :)
updatethough 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
|
|