Fixed:
sub comp { my ($f, $s) = @_; return -1 if length ($f) != length ($s); local $_ = $f ^ $s; return -1 unless tr/\x00/1/c == 2; my $i = index $_ => "11"; return -1 unless $i >= 0; return -1 unless substr($f, $i, 2) eq reverse substr($s, $i, 2); return $i; }
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Detecting transpositions
by sauoq
in thread Detecting transpositions
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |