Perl Monk, Perl Meditation | |
PerlMonks |
Re: How do I restrict a variable to a range of values?by bofh_of_oz (Hermit) |
on Jul 27, 2005 at 15:17 UTC ( [id://478636]=note: print w/replies, xml ) | Need Help?? |
In two words: you don't. In many more words: You can't restrict a variable from having any value it gets assigned. You can, however, write a validation block to check for valid values and complain|die|ignore the rest. I believe that's how it's being done in most cases...
--------------------------------
In Section
Seekers of Perl Wisdom
|
|