in reply to Re: generating hash patterns for searching with one mismatch
in thread generating hash patterns for searching with one mismatch

1) maybe Text::Levenshtein will help you here; it calculates the Levenshtein_distance for you,
Which is nothing like what he wants, since it allows indels. He wants hamming distance, so T::L would do the wrong thing.
efficiency is hard to define;
No it isn't: he probably wants to match many short strings against a long one (like a chromosome, with millions of characters) as quickly as possible.
  • Comment on Re^2: generating hash patterns for searching with one mismatch