Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Conditional for statement block (not just bare statement)

by oko1 (Deacon)
on Dec 17, 2008 at 01:24 UTC ( [id://730786]=note: print w/replies, xml ) Need Help??


in reply to Re: Conditional for statement block (not just bare statement)
in thread Conditional for statement block (not just bare statement)

No disagreement with most of what you've written, but 'while' and 'do/while' have different purposes. I suppose that it can be considered a matter of preference, but IMO, forcing one to serve the purpose of the other is a bit square-block-into-round-hole-ish. :)

do { print "Please enter $THING_TO_VALIDATE"; chomp($input = <STDIN>); } while THING_IS_NOT_VALID();

--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-25 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found