Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Welcome to the Monastery
 
PerlMonks  

Re: Perl style question: loops with postcondition

by Popcorn Dave (Abbot)
on Jun 28, 2002 at 16:01 UTC ( [id://178122]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Perl style question: loops with postcondition

I'm not so sure if it's which is most popular as much as it depends on what you're trying to do.

As a lot have said, the do-while loop is popular, but it is different in execution from the while loop.

As it was explained to me in a beginning perl class, you need to simply keep in mind that a while checks the condition initially and may not execute. A do-while executes at least once before the condition is checked.

As far as the LOOP: variant (shudder...) that seems to be more of a throwback to the old days of BASIC, but that's just my opinion. : )

Some people fall from grace. I prefer a running start...

  • Comment on Re: Perl style question: loops with postcondition

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://178122]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.