my $s1 = "STCATTNNNSATCGCT"; my $s2 = "ATCGTCGSNNNNATCG"; ## # 0 # # There are 4 matching positions - marked with (#) - # and notice that matching N is not counted (0)