BTW, I don't think your function calculates the Hamming distance...sub characters_in_common { my ($p, $q) = @_; my $r = $p ^ $q; my $count = $r =~ y/\0//; return $count; }
In reply to Re: Substr versus Regexp
by trammell
in thread Substr versus Regexp
by monkfan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |