Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-08-21 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (324 votes). Check out past polls.

    Notices?