Firstly, apologies for the slow response: I've been ill and haven't logged in for some days.

I received a couple of private messages from you, possibly (and I'm completely guessing here) due to frustration if you thought I was ignoring you: not the case. And regarding the downvote: can't help; wasn't me; I've only just seen your post.

I do tend to avoid mutliple uses of $_ in the same construct. Even when it's not a problem with actual logic, it does reduce readability and maintainability. I generally concur with what others have already written about that, so I'll leave it there.

I was genuinely interested in where your problem might lie. My posted code, using your exact code, was an attempt to identify the issue: as shown, I couldn't reproduce it.

I see there's been a lot more discussion since I was last here. I don't believe I can add anything to that.

— Ken


In reply to Re^3: Next from inner loop only works "most of the time" by kcott
in thread Next from inner loop only works "most of the time" by Marshall

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.