Both of your questions are quite elegantly handled by junctions. If
the condition were, say, $elem > 10:
Jonathan Lang <[EMAIL PROTECTED]> wrote:
> if a given condition is true for every element in a list, do something.
if all(@list) > 10 { ... }
> if a given condition is true for any element in a list, do something.
if any(@list) > 10 { ... }
--
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker
"For those of you that can't spell, this site also contains free
imags, iamges, imges, picturs, pcitures, picktures, picturess, and
pistures."