nested loop.

Discussion in 'Perl Misc' started by Richard S Beckett, Nov 6, 2003.

  1. Guys,

    I have a while(1) loop, that contains another while(1) loop.

    If I put a next command in the outer loop, everything is fine. As soon as I
    added a next command to the inner loop, everything went wrong. Is the next
    acting on the outer loop, rather than the inner one, and if so, how can I
    make it act on the inner one?

    Thanks.
    --
    R.
    GPLRank +79.699
    Richard S Beckett, Nov 6, 2003
    #1
    1. Advertising

  2. Ah! Found the problem!

    Sorry.

    (Because I was using a while(1) loop, I was manually incrementing my
    counter, and when I inserted the next command, the counter was never
    incremented, so the loop got stuck on the same operator. D'oh!)
    --
    R.
    GPLRank +79.699

    > Guys,
    >
    > I have a while(1) loop, that contains another while(1) loop.
    >
    > If I put a next command in the outer loop, everything is fine. As soon as

    I
    > added a next command to the inner loop, everything went wrong. Is the next
    > acting on the outer loop, rather than the inner one, and if so, how can I
    > make it act on the inner one?
    >
    > Thanks.
    > --
    > R.
    > GPLRank +79.699
    >
    >
    Richard S Beckett, Nov 6, 2003
    #2
    1. Advertising

  3. "Richard S Beckett" <> wrote in
    news:bodu5l$1q8$:

    > Ah! Found the problem!
    >
    > Sorry.
    >
    > (Because I was using a while(1) loop, I was manually incrementing my
    > counter, and when I inserted the next command, the counter was never
    > incremented, so the loop got stuck on the same operator. D'oh!)


    We are so happy for you. However, please read the posting quidelines
    (available at http://mail.augustmail.com/~tadmc/clpmisc.shtml). Post code
    instead of trying to verbally describe your code and then summarize your
    problem if you want anyone else to be able to help you.

    Sinan.
    A. Sinan Unur, Nov 6, 2003
    #3
  4. A. Sinan Unur <> wrote:
    > "Richard S Beckett" <> wrote in
    > news:bodu5l$1q8$:


    >> Sorry.


    > However, please read the posting quidelines



    I think you are "talking to the hand" in this case. :-(


    Message-ID: <ajvra9$3b3$>

    Message-ID: <ak27sg$o0$>


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Nov 6, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russ Perry Jr
    Replies:
    2
    Views:
    4,092
    Russ Perry Jr
    Aug 20, 2004
  2. Chad E. Dollins
    Replies:
    3
    Views:
    645
    Kai-Uwe Bux
    Nov 8, 2005
  3. request@no_spam.com
    Replies:
    5
    Views:
    410
  4. Ultrus
    Replies:
    3
    Views:
    361
    Stefan Behnel
    Jul 9, 2007
  5. Isaac Won
    Replies:
    9
    Views:
    348
    Ulrich Eckhardt
    Mar 4, 2013
Loading...

Share This Page