Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Need help testing to see if a variable is one value or the other

by Skeeve (Parson)
on Jan 31, 2008 at 07:22 UTC ( [id://665298]=note: print w/replies, xml ) Need Help??


in reply to Need help testing to see if a variable is one value or the other

TMTOWTDI

#!/usr/bin/perl -w use strict; my %allowed_reply= ( yes => 1, no => 1, ); my $var = "yes"; if ( $allowed_reply{$var} ) { print "You choose $var\n"; }else{ print "you chose something other then yes or no\n" }

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 16:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found