Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Why is the null while-loop condition expression true?

by Paladin (Vicar)
on Mar 28, 2016 at 18:31 UTC ( [id://1158970]=note: print w/replies, xml ) Need Help??


in reply to Why is the null while-loop condition expression true?

From perlsyn (5.22.1 at least):
    As a special case, if the test in the "for" loop (or the corresponding
    "while" loop) is empty, it is treated as true. That is, both

        for (;;) {
            ...
        }

    and

        while () {
            ...
        }

    are treated as infinite loops.
  • Comment on Re: Why is the null while-loop condition expression true?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1158970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-03-30 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found