in reply to Restricting a scalar to certain values
The only vague approximation that I have seen is use constant {};. And it is a very poor substitute. The Perl language simply does not have real enumerated-types or compile-time checking.