Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: while loop question

by philiprbrenan (Monk)
on Sep 07, 2012 at 16:46 UTC ( [id://992344]=note: print w/replies, xml ) Need Help??


in reply to while loop question

Please consider putting the loop in a sub, thus:

sub foo() {for(1..10) {return 0 if ...; } 1 } if (foo()) {...}

and giving the sub a meaningful name

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found