DB<47> use List::MoreUtils qw/any/ DB<48> @x=1..10000;() DB<49> $i=0; $flag= any { $i++; $_ %2 } @x; ($i,$flag) => (1, 1) DB<50> $i=0; $flag= grep { $i++; $_ %2 } @x; ($i,$flag) => (10000, 5000)