This may help you. The code below generates a array list that eliminates redundant data.
my @set = qw(A B C D A);
my @list;
my $elm;
my $count=0;
foreach my $one (@set) {
foreach my $two (@set) {
$elm ="$one"."$two";
foreach $list(@list){$count++ if ($list eq elm);}
push @list,"$one$two" if($count eq 0);
}
}
Cheers!!!!
Anandatirtha
In reply to Re: Combinations of a set of elements
by Ananda
in thread Combinations of a set of elements
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |