Help for this page

Select Code to Download


  1. or download this
    my $length = length $string;
    my %seen;
    ...
      $seen{ substr($string, $i, 2) } ++ if $i < $length - 1;
      $seen{ substr($string, $i, 3) } ++ if $i < $length - 2;
    }