Modulo any syntax foibles, I think it'd look like this:
>
> if a given condition is true for every element in a list, do something.
if all(LIST) > 3 { do_something }
>
> or
>
> if a given condition is true for any element in a list, do something.
if any(LIST) > 3 { do_something }
Where LIST is, of course, the actual list of things. The exact syntax
of the conditional would change with what you wish to test.
if all(LIST) ~~ /foo/ { do_something }
if 7 < all(LIST) < 15 { do_something }
if all(LIST) eq 'fred' { do_something }
-Scott
--
Jonathan Scott Duff
du...@pobox.com
if a given condition is true for every element in a list, do something.
or
if a given condition is true for any element in a list, do something.
=====
Jonathan "Dataweaver" Lang
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
Jonathan Lang <datawe...@yahoo.com> 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 <br...@brentdax.com>
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."