in reply to Restricting a scalar to certain values
The closest thing that I can think of is Data::Rlist. What you are asking sounds a bit like an enum. This discussion might be useful:
How can I create an enum type in Perl?
1. Keep it simple
2. Just remember to pull out 3 in the morning
3. A good puzzle will wake me up
Many. I like to torture myself
0. Socks just get in the way
Results (379 votes). Check out past polls.