Help for this page

Select Code to Download


  1. or download this
    sub encode {
        (my $string = shift) =~s/((.)\2*)/$2 . (length $1) /eg;
        $string;
    }
    
  2. or download this
    sub group {
      my $x = shift;
    ...
             }{}gx;
      \@groups;
    }