Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 surveying the Monastery: (5)
As of 2025-07-11 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.