Problems? Is your data what you think it is? | |
PerlMonks |
Re: Trying to use substring to find a reverse complement in DNA,by johngg (Canon) |
on Dec 06, 2015 at 00:16 UTC ( [id://1149486]=note: print w/replies, xml ) | Need Help?? |
Rather than the series of if { ... } elsif { ... } ... tests you could use a hash table to look up the base and use it as the fourth argument to substr to replace the original.
I hope this is of interest. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|