in reply to Re: Text::Levenshtein - trouble
in thread Text::Levenshtein - trouble

Indeed, the module is buggy. The comment here helped unbreak a script I wrote using the module. The lines that need to be commented are:

# in distance() foreach my $i (1 .. $n) { #if ($i != $n && substr($s,$i) eq substr($t,$i)) { # push @result,$i;next; #} $d[$i][0]=$i; } foreach my $j (1 .. $m) { #if ($j != $m && substr($s,$j) eq substr($t,$j)) { # push @result,$j;next; #} $d[0][$j]=$j; } # and the two early returns in fastdistance()