Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl style question: loops with postcondition

by braughing (Sexton)
on Jun 30, 2002 at 01:07 UTC ( [id://178291]=note: print w/replies, xml ) Need Help??


in reply to Perl style question: loops with postcondition

TomDLux mentions for (;$condition;) {} which has several advantages - it explicitly signals a 'postcondition loop' (or whatever other kind of loop) right at the beginning, it has its own scope and allows last etc, and most importantly it is flexible. It's pretty ugly though.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2025-05-23 21:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.