in reply to generating all subsets of an array

Algorithm::ChooseSubsets does this. The output follows __END__.
use strict; use warnings; use Algorithm::ChooseSubsets; my @items = qw/red white blue/; my $iter = Algorithm::ChooseSubsets->new(\@items); while (my $x = $iter->next) { print "@$x\n" } __END__ C:\perlp>perl t2.pl red white blue red white red blue white blue red white blue C:\perlp>
Chris