Help for this page

Select Code to Download


  1. or download this
    my $word = 'bantha fodder';
    
    ...
        printf " the  %-10s: %-3s ocurred %-3s time%s\n",
               $t,$_,$counts{$_},$s
    }
    
  2. or download this
     the  letter    : 'a' ocurred 2   times
     the  letter    : 'd' ocurred 2   times
    ...
     the  letter    : 'f' ocurred 1   time
     the  letter    : 't' ocurred 1   time
     the  letter    : 'o' ocurred 1   time
    
  3. or download this
    sub letter_counts {
        my @letters = split//, lc(shift);
    ...
    }
    
    print "'$word1' and '$word2' $result\n";