- or download this
sub mk_fuzzy {
our ($m, $i, $d) = splice @_, 0, 3;
...
(?{ [ [$m-$^R->[2], $m], [$i-$^R->[0], $i], [$d-$^R->[1], $d] ] })
}x;
}
- or download this
my $test = mk_fuzzy(
1, # max number of modifications to allow
...
print "$word isn't enough like 'perl'\n";
}
}
- or download this
my $test = mk_fuzzy(
1, # max number of modifications to allow
...
print "$word isn't enough like 'perl'\n";
}
}
- or download this
if ($word =~ $test) {
my ($m_used, $m_allowed) = @{ $^R->[0] };
...
my ($d_used, $d_allowed) = @{ $^R->[2] };
print "Using $m_used mods, $i_used inserts, and $d_used dels, $word
+matched\n";
}