in reply to Re^2: simple string comparison for efficiencyin thread simple string comparison for efficiency
Add the line:
my $nCount = ($mask1 =~ tr/N//) + ($mask2 =~ tr/N//); [download]
as the third line of sub match.