This code uses a hash instead of a simple array for mat. I changed it to a regular array, and it reduced the execution speed by 19.3%.

In reply to Re: Levenshtein distance: calculating similarity of strings by Anonymous Monk
in thread Levenshtein distance: calculating similarity of strings by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":