Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: On goto

by Jenda (Abbot)
on Mar 01, 2003 at 19:22 UTC ( #239745=note: print w/ replies, xml ) Need Help??


in reply to On goto

I would probably use something like:

while (ask('databasetype','Database type?','mysql')) { last if (grep {getConf('databasetype') eq $_} @databases); output "Sorry, invalid option\n\n"; }

And the ask() would return true if the user replied to the question and false if he accepted the default (no need to validate the default I guess) or pressed CTRL+D/CTRL+Z (end of input).

Jenda


Comment on Re: On goto
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2014-09-03 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls