Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Trying to use substring to find a reverse complement in DNA,

by RichardK (Parson)
on Dec 05, 2015 at 23:12 UTC ( #1149483=note: print w/replies, xml ) Need Help??


in reply to Trying to use substring to find a reverse complement in DNA,

The condition on your for loop is the wrong way round, you need to use less than not greater than, here:-

$i>$length-1;

If you want to know how to fix these things for yourself try the basic debugging checklist

Replies are listed 'Best First'.
Re^2: Trying to use substring to find a reverse complement in DNA,
by AnomalousMonk (Chancellor) on Dec 06, 2015 at 02:32 UTC
    ... you need to use less than not greater than ...

    I would say tryingnottofailmytes needs to use less-than-or-equal
        $i <= $length-1
    as the for-loop condition in the OPed code.


    Give a man a fish:  <%-{-{-{-<

Re^2: Trying to use substring to find a reverse complement in DNA,
by tryingnottofailmytes (Novice) on Dec 05, 2015 at 23:24 UTC
    THANK YOU SO MUCH!!!! This is my problem, I get really close in my code (at least I think I do) and I can't find the problems and I freak out and get a terrible score...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1149483]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2018-12-15 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (70 votes). Check out past polls.

    Notices?