Help for this page

Select Code to Download


  1. or download this
    use v5.20;
    use Data::Dump "pp";
    
    ...
    {
        $j =~ $z and say pp {$j => \@- };
    }
    
  2. or download this
    ...
    { acbcaa => [0, 6, 6, 3, 3, 4, 4] }
    { acbcab => [0, 5, 5, 6, 6, 4, 4] }
    ...
    { cccbca => [0, 6, 6, 4, 4, 5, 5] }
    { ccccab => [0, 5, 5, 6, 6, 4, 4] }
    { ccccba => [0, 6, 6, 5, 5, 4, 4] }
    
  3. or download this
    my @y = glob('{a,b,c}'x6);
    my $y = '(?:(?!\1)a()|(?!\2)a()|(?!\3)b()|(?!\4)b()|(?!\5)c()|(?!\6)c(
    +)){6}\1\2\3\4\5\6';
    
    ...
    {
        $j =~ $y and say $j;
    }
    
  4. or download this
    aabbcc
    aabcbc
    aabccb
    ...
    ccbaab
    ccbaba
    ccbbaa
    
  5. or download this
    # edit reformatted as a multiline regex for clarity
    my $y = qr/(?:
                   (?!\1) a ()
    ...
                 | (?!\6) c ()
               ){6}
             /x;