#!/usr/bin/perl use strict; use warnings; use Math::Combinatorics; my @zeichen = ('A'..'C'); my $count = 3; my $combo = Math::Combinatorics->new( count => $count, data => [(@zeichen) x $count]); while(my @combo = $combo->next_combination){ print join(' ', @combo)."\n"; }