|
Posted by Ben Bullock on June 10, 2008, 2:43 am
Please log in for more thread options
> I've tried to identify the invisible characters leading to unsuccessful
> pattern matching. However the screen prints out nothing special like this:
>
> ORF: AAAAMT0002
> pattern COG3i start: AAAAMT0002
>
> What should I do to find out the problem? Thanks a lot.
The problem is probably a space character at the end of the string. If
you change the print statement you might see it.
> $pattern2 = $aref2->[$cog3i];
> $pattern2 =~ s/[\t\n^M]//g;
$pattern2 =~ s/\s+//g;
> $pattern1 = $aref1->[$orfi];
> $pattern1 =~ s/[\t\n^M]//g;
$pattern1 =~ s/\s+//g;
> if ($pattern1 !~ /$pattern2/) {
> print "ORF: AAAA$pattern1\n";
print "ORF: '$pattern1'\n";
> print "pattern COG3i start: AAAA$pattern2\n";
print "pattern COG3i start: '$pattern2'\n";
> <STDIN>;
What does that do?
|