use Text::Levenshtein qw(fastdistance distance); print fastdistance("history","hustory"), "\n"; # prints "2"