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

Do you get a bit more speed by doing this?
if ($seq !~ /$sub1|$sub2/) { ... }
(It's fun to code in a domain where performance matters.)