Incredibly sorry about the head-hurtingness, yet appreciative of the help :D
Guess when i stare at my code all day, i don't realise that it makes sense only to me (that, and being primarily a biologist, doesn't help).

I have many files with 10's of thousands of lines like these:
YAL038W 1.1 2.4 4.1 YCL040W 1.1 1.6 1.8 9.11 0.0402128119838095 YDR132C 99 YDR223W 99 0.0085523710563531 YDL188C 01.05.04 10.03.01 40.01 42.0 43.01.03.05 YGL134W 01.05.04 02.1 +9 -0.0831302979427955

I have these read into a 2-D array already.
Now, with the code I posted, i am trying to see if, for each value of the identifier on the left side of the line, it contains a value that starts with a number from the list i have stored in an array ($pathway_name: these are simple integers like 1, 2, 3).
That's where the awful while loop thingy came from. My code only has to work, not be pretty ;)
The %seen hash refers to whether the identifier has already been seen on the iteration for this pathway value. I'm beginning to think that may be causing the problem, although there are no error messages displayed.

My problem is, that when it comes to going on to the next $m in the outer for loop, it skips every second one. It will enter the for loop, but not the if/elsif/else statements.

Is this any clearer?

In reply to Re^2: Loop skipping by ringleader
in thread Loop skipping by ringleader

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.