in reply to Re: The sum of absolute differences in the counts of chars in two strings.
in thread The sum of absolute differences in the counts of chars in two strings.
to put the whole thing into a single evalYou should. Try this, on my machine, this beats your grep solution:
sub usingtr_1e { eval join '+', map qq{abs(('$aa' =~ y/$_//)-('$bb' =~ y/$_//))}, 'A' .. 'Z'; }
|
|---|