develooper Front page | perl.beginners | Postings from February 2009

Acepting default value for user input

Thread Next
Sarsamkar, Paryushan
February 27, 2009 07:03
Acepting default value for user input
Message ID:
Hi All,


I would like to accept some user inputs (using <STDIN>), but it might be
easier for a user if I can provide the default value, so that they just
have to press ENTER.


How can I do that? I've played around with <STDIN> but I cannot make it
work exactly as I'd like.




Do you want to do the normal thing? [yes] : 

Do you want to do something strange, tedious, and/or risky? [no] :

What you want as your return address? [you@there] :







Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About