Here's a method using Algorithm::Combinatorics.
use Algorithm::Combinatorics qw(variations_with_repetition); my $length = 4; my @data = qw(1 2 3); my $iter = variations_with_repetition(\@data, $length); while (my $p = $iter->next) { print join("",@$p)."\n"; }
In reply to Re: Generating lists of strings
by gmargo
in thread Generating lists of strings
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |