Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: until loops

by Anonymous Monk
on Sep 03, 2003 at 09:44 UTC ( #288565=note: print w/ replies, xml ) Need Help??


in reply to Re: until loops
in thread until loops

I dont think that is correct, the expression "$year==2000" will be false if $year is not 2000 but the actual statement of unless($year==2000) will be true unless year equals 2000. Also an infinite loop is one where the condition will never be met and so will never terminate, in this case if year will never become 2000. For example, if year was initialised to 2001 or if year was 1999 and never incremented then it is an infinite loop.


Comment on Re: Re: until loops

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-07-28 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls