This article has been dead for over three months
You
# permutations of an array:
use List::Permutor;
my @array = qw(Mary had a little lamb);
my $perm = new List::Permutor @array;
while (my @set = $perm->next) {
print "One order is @set.\n";
}
# permutations of a word:
use List::Permutor;
my $word = 'perl';
my $perm = new List::Permutor split(//,$word);
while (my @set = $perm->next) {
print "One order is @set.\n";
}