Help for this page

Select Code to Download


  1. or download this
    my $str = 'aabcdabcabcecdecd';
    
  2. or download this
    (abc => 3, bc => 3, cd => 3, ecd => 2)
    
  3. or download this
    sub count1 {
        local $_=shift;
    ...
    
        \%count;
    }
    
  4. or download this
    $VAR1 = {
              'cd' => 3,
    ...
              'abc' => 3,
              'bc' => 3
            };
    
  5. or download this
    $VAR1 = {
              'cd' => 3,
    ...
              'd' => 3,
              'bc' => 3
            };
    
  6. or download this
    sub count2 {
        my $s=shift;
    ...
        } 0..length($s)-1;
        \%count;
    }
    
  7. or download this
    $VAR1 = {
              'ecd' => 2,
              'abc' => 3,
              '3' => 2
            };