Or use List::Util::first:for (@list) { if ($_ > 0.1) { $seen = 1; last; } } print "@list" if $seen;
use List::Util qw/first/; print "@list" if first { $_ > 0.1 } @list;
In reply to Re: If any element-in-array comparision
by choroba
in thread If any element-in-array comparision
by naturalsciences
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |