in reply to Similarity of strings
Use the XOR!
my $x = "EKFCNSVVDLYSNLSKPFLDIVLYIFKLTSAIGAQGPA----SMMAYLVV"; my $y = "ERFCRQLSSMASKLI-------ISPFTLVYYTYQCFQSTGWPVSIFGYFI"; my $z = $x^$y; my $score = ($z =~ tr/\0//); return $score/length($x)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Similarity of strings
by professa (Beadle) on May 15, 2002 at 15:35 UTC |