in reply to generating all subsets of an array
Chrisuse 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>
|
|---|