Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: do/redo or for(;;): what's Kosher?

by derby (Abbot)
on Jan 03, 2002 at 22:45 UTC ( #136034=note: print w/ replies, xml ) Need Help??


in reply to do/redo or for(;;): what's Kosher?

rje,

I've always been partial to:

while( 1 ) { # do stuff last if BREAK-CONDITION }

sure you have to re-evaluate the conditional but that's a price I'm willing to pay for better readability. redo inside one block seems silly and if I used it deep in nested blocks (with a label) I'd feel dirty.

-derby


Comment on Re: do/redo or for(;;): what's Kosher?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2015-07-31 21:28 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 (282 votes), past polls