in reply to do-while loop never exits

I see you're running on a PC. the end of line terminator in windoze is '\r\n', but you may have your end of line terminator set to solely '\n', which would cause it to never quit.

--Ray

Also did you type in the first line correctly? Just curious, I don't do the PC perl thing much, but should it have a #!/c: or just a #!c: ?

Replies are listed 'Best First'.
Re^2: do-while loop never exits
by Eliya (Vicar) on Apr 19, 2011 at 13:17 UTC
    ...line terminator set to solely '\n', which would cause it to never quit.

    The PerlIO layer ":crlf" (which is active on Windows by default) translates \r\n to \n, so the chomp with the subsequent eq test would work fine...

      /me hangs his head in shame.