If you need to deal with combinatorial sequences :
Algorithm::Combinatorics
#!/usr/bin/perl use strict; use warnings; use Algorithm::Combinatorics qw(variations_with_repetition); my @data = qw(a b c); my $iter = variations_with_repetition( \@data, $#data ); while ( my $c = $iter->next ) { print @$c, "\n"; } __END__ Output: aa ab ac ba bb bc ca cb cc
hth,
PooLpi
In reply to Re: finding combinations and removing selective duplicates
by poolpi
in thread finding combinations and removing selective duplicates
by targetsmart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |