Help for this page

Select Code to Download


  1. or download this
    my $code = join "\n;\n", map {sprintf '$count{ $_ } = tr/%s/%s/', $_, 
    +$_ } @alphabet;
    my %count;
    local $_ = $string1;
    eval $code;
    
  2. or download this
    my $code2 = join "\n+\n", map {sprintf 'abs($count{ %s } - tr/%s/%s/)'
    +, $_, $_, $_ } @alphabet;
    local $_ = $string2;
    eval $code2;