Based on your description I suspect that you are trying to compare DNA sequences, either at the level of a codon or translated to protein sequences. If that is the case, much more efficient and robust ways to do this are available. A more complete description of the problem would help.

Recommended next steps:


In reply to Re: string similarity by using a function sort_by_similarity() by bobf
in thread string similarity by using a function sort_by_similarity() by roopa

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