Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: prompting a user for input

by Anarion (Hermit)
on Nov 04, 2001 at 15:11 UTC ( [id://123164]=note: print w/replies, xml ) Need Help??


in reply to prompting a user for input

I dont know what is the best way, just an if and else, or if and next, i usually use "do that and next if that" but for what you want yo do your regex is wrong, it should be:
~/^(y|yes)$/i
Yours match every answer that begins with y or ends with yes, try for example young or eyes.

$anarion=\$anarion;

s==q^QBY_^=,$_^=$[x7,print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 13:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found