in reply to Similarity of strings
# Method 1 my @a1 = split //, $ref_seq; my @a2 = split //, $test_seq; $score += ($a1[$_] eq $a2[$_]) for 0 .. $#a1; # Method 2, Destructive $score += (chop $ref_seq eq chop $test_seq) while $ref_seq;
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Similarity of strings
by professa (Beadle) on May 15, 2002 at 15:31 UTC |