Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Restricting a scalar to certain values

by Anonymous Monk
on Jun 20, 2013 at 07:54 UTC ( #1039912=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    tie my $state, 'Scalar::Restrict', qw/ idle waiting active /;
    # or maybe
    lock_scalar my $state, qw/ idle waiting active /;
    
    # $state may now only be "idle", "waiting", or "active"
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1039912]
Approved by kcott
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (16)
As of 2014-07-10 13:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (211 votes), past polls