Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Adding Default Values [for BEGINNERS]

by ikegami (Pope)
on Dec 21, 2006 at 22:57 UTC ( #591218=note: print w/replies, xml ) Need Help??


in reply to Adding Default Values [for BEGINNERS]

What follows is a sample construct for asking again instead of using a default.

my $file; for (;;) { print "Which file do you want to open? "; $file = <STDIN>; chomp($file); last if length $file; print "Please supply a file name.\n"; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2021-11-29 18:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?