Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: If any element-in-array comparision

by choroba (Cardinal)
on Jan 27, 2012 at 16:21 UTC ( [id://950405]=note: print w/replies, xml ) Need Help??


in reply to If any element-in-array comparision

for (@list) { if ($_ > 0.1) { $seen = 1; last; } } print "@list" if $seen;
Or use List::Util::first:
use List::Util qw/first/; print "@list" if first { $_ > 0.1 } @list;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://950405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 01:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found