Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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

by Paladin (Vicar)
on Mar 28, 2016 at 18:31 UTC ( #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
Node Status?
node history
Node Type: note [id://1158970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2019-10-22 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?