Help for this page
sub permutation { my ($perm,@set) = @_; ... } my @input = (qw/a b c d/); permutation('',@input);
permutation($perm.$set[$_],@set[0..$_-1],@set[$_+1..$#set]) foreach (0 +..$#set);