Ok, thank you. Now I understand a lot more about using bitwise approaches to Perl. I also just noticed your post from a while ago regarding Hamming Distance:
my $s1 = 'AAAAA';
my $s2 = 'ATCAA';
my $s3 = 'AAAAA';
print "$s1:$s2 hd:", hd( $s1, $s2 ); # will give value 2
print "$s1:$s3 hd:", hd( $s1, $s3 ); # will give value 0
sub hd{ length( $_
) }
I just didnt understand the line above defining the subroutine. How do you know which part refers to which sequence ($s1 vs $s2 for example)?
Thank you so much! I can't believe how helpful and patient you are.