Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Check if at least one element of array is bigger than X

by eric256 (Parson)
on Apr 09, 2010 at 14:56 UTC ( #833835=note: print w/ replies, xml ) Need Help??


in reply to Re: Check if at least one element of array is bigger than X
in thread Check if at least one element of array is bigger than X

More than one way to skin a cat:

#!/usr/bin/perl use strict; use warnings; my @array = (1..10); my $found = 0; for (@array) { $found ++ if $_ > 10; } print "Bigger than 10" if $found;

___________
Eric Hodges


Comment on Re^2: Check if at least one element of array is bigger than X
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-07-30 18:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls