Next Tricks of the Wizards 207

reduce

        reduce { $a && $b > 0 } "yes", @list;
        reduce { $a && $b > 0 || ($a=undef, last) } "yes", @list;


Next Copyright © 2003 M. J. Dominus