Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: IF Statement Testing

by !1 (Hermit)
on May 14, 2005 at 06:02 UTC ( [id://456988]=note: print w/replies, xml ) Need Help??


in reply to IF Statement Testing

if ($expire < 1 ||  14 < $expire || int $expire != $expire) { die "Don't tamper with me!"; } or
my %check; undef @check{1..14}; if (! exists $check{$expire}) { die "Don't tamper with me!"; }
or
if ($expire !~ /^(?:[1-9]|1[0-4])$/) { die "Don't tamper with me!"; }
or
use Quantum::Superpositions; if ($expire != any(1..14)) { die "Don't tamper with me!"; }

and many other ways.

Log In?
Username:
Password:

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

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

    No recent polls found