in reply to numbers not adding up!

Found it - in not using the recommended use strict, you have two variables with very similar names - $segSize and $seqSize. The latter, not being defined, adds nothing to $offset.

Make all your code start with:

#! /usr/bin/perl -w use strict; ...
and this particular problem will never go unnoticed again.



pbeckingham - typist, perishable vertebrate.

Replies are listed 'Best First'.
Re^2: numbers not adding up!
by wusphere (Novice) on Aug 07, 2004 at 23:19 UTC
    Thanks very much! I have fixed the problem. You got eagle eyes.

      No, actually, I don't have eagle eyes. I have thirty-nine year old human eyes, and on top of that I'm sitting in a dark room, after an afternoon of driving toward the sun. You completely missed my point! I took your program, added the magic incantations:

      #! /usr/bin/perl -w use strict; ...insert your program here...
      and then I ran it, and Perl itself told me what was wrong with it.



      pbeckingham - typist, perishable vertebrate.
        pbeckingham, I am a novice in PERL and I really very interested to learn. Do you have any advice for me? Thanks