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;
In reply to Re^2: Check if at least one element of array is bigger than X
by eric256
in thread Check if at least one element of array is bigger than X
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |