A module is probably not a bad idea here, especially if you really need those range constraints (as per your example.) I would recommend taking a look at perldoc perldsc (the data structures cookbook that comes with Perl) for some examples of ADTs.
In reply to Re: Help with ADT
by DamnDirtyApe
in thread Help with ADT
by dimmesdale
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |