- or download this
use Algorithm::Loops qw( NestedLoops );
...
NestedLoops(\@_, sub { push(@rv, [ @_ ]); });
return \@rv;
}
- or download this
my $comb = comb([qw(a b c)],[qw(1 2 3)],[qw(- + *)]);
...
));
print(scalar(@$comb), "\n"); # 27
- or download this
sub comb {
my @idx = map { 0 } @_;
...
}
}
}