in reply to nested foreach loop, match DNA sequences and calculate score
Your $base1 and $base2 variables aren't arrays, but you're treating them as such. Just try:
if ($base1 eq $base2)
Also, your print $score; statement on line 32 should be inside the curly braces. There may be more issues, but that's all I see at the moment.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|