Help for this page

Select Code to Download


  1. or download this
    @x = glob('{a,b,c}'x3); # for testing: all permutations, plus many mor
    +e
    
    ...
    for $i (@x) {
        $i =~ $x and say $i; # was $x =~ $i
    }
    
  2. or download this
    abc
    acb
    ...
    bca
    cab
    cba
    
  3. or download this
    @x = glob('{a,b,c}'x6);
    $x = '(?:a()|a()|b()|b()|c()|c()){6}\1\2\3\4\5\6'; # limited repeats a
    +llowed
    ...
    for $i (@x) {
        $i =~ $x and say $i; # was $x =~ $i
    }
    
  4. or download this
    aaaabc
    aaaacb
    ...
    cccbca
    ccccab
    ccccba
    
  5. or download this
    @x = glob('{abc,bcd,cde}'x3);
    # permutations of 'abc/bcd/cde'
    ...
    for $i (@x) {
        $i =~ $x and say $i; # was $x =~ $i
    }
    
  6. or download this
    abcbcdcde
    abccdebcd
    ...
    bcdcdeabc
    cdeabcbcd
    cdebcdabc