Help for this page

Select Code to Download


  1. or download this
    my %weight = (
        A => 0.6562,
    ...
    for my $ch (split //, $string) {
        $count += $tbsz * $weight{$ch};
    }
    
  2. or download this
    ...
    while ($string =~ /(.)/gs) {
        $count += $tbsz * $weight{$1};
    }