Given a certain sequence A stored in an array, I have to find if a larger sequence B contains sequence A.
I am stuck at the index part... and i'm getting an error that argument "TGACCA" isn't numeric in array element in line 69 which is:
if (index($record_r1[1], $r2_seq[$check]) != -1)
The code is:
foreach my $check (@r2_seq)
{
if (index($record_r1[1], $r2_seq[$check]) != -1)
{
$matches= $matches + 1;
print "Matched";
}
else
{
}
}