in reply to Re: Re: Character Combinations
in thread Character Combinations

You mean this?
use Algorithm::FastPermute; my @c = ('a'..'c'); for my $i (0..2) { for my $j (0..2) { my @c = @c[$i..$j] if $i <= $j; permute {print @c , "\n"} @c; } } __END__ a ab ba abc acb cab bac bca cba b bc cb c

Replies are listed 'Best First'.
Re: Re: Re: Re: Character Combinations
by Limbic~Region (Chancellor) on Aug 22, 2003 at 23:47 UTC
    Considering that missed ca - no. It also doesn't work if you change
    my @c = ('a'..'c');
    my @c = ('a'..'z');

    Permutations are not combinations.


    A reply falls below the community's threshold of quality. You may see it by logging in.