CC: | DONANGEL [...] cpan.org |
Subject: | error in subroutine subsets |
Hi!
Error: superfluous, empty iteration in subroutine subsets()
Example:
########### test.pl ###########
#!/usr/bin/perl -w
use strict;
use Algorithm::Combinatorics qw( subsets );
my @a = ('A','B','C');
my $i;
my $iter = subsets(\@a);
while(my $base = $iter->next){
print ++$i, "\t", join ' ',@{ $base },"\n";
}
########### OUTPUT ###########
1 A B C
2 B C
3 A C
4 C
5 A B
6 B
7 A
8 <Empty>
Why 8 <Empty>?