in reply to Check if at least one element of array is bigger than X
Forgive me if I'm traditional, but we had none of these problems when we used real for loops or while loops instead of these fancy new control structures.
for (my($i, $quit) = 0; !$quit && $i < @array; $i++) { if (10 < $array[$i]) { print "array element at index $i value $array[$i] is bigger th +an 10\n"; $quit++; } }
This is part joke, part serious.
|
|---|