Help for this page

Select Code to Download


  1. or download this
    $n=4;
    $str="abababbcad";
    ...
    while($str =~ m[(?=([abcd]{$n})).]g){
                       ++$count{ $1};     
                   }
    
  2. or download this
    $count{$1}=1
    
  3. or download this
    $str1="abad";
    $str2="aaab";
    $n=2;