use Algorithm::FastPermute; sub combinations { return [] unless @_; my $first = shift; my @rest = combinations(@_); return @rest, map { [$first, @$_] } @rest; } for(combinations('a'..'c')){ my @c = @{$_}; permute {print @c , "\n"} @c; } __END__ c b bc cb a ac ca ab ba abc acb cab bac bca cba
In reply to Re: Re: Re: Re: Re: Character Combinations
by chunlou
in thread Character Combinations
by viGuy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |