My initial attempt was based on given but I switched to using a list of smart matches and subroutines because given has a drawback compared to dispatch tables...
With dispatch tables you can check whether a particular value can dispatch, without actually doing the dispatching yet. If your dispatch table is a hash, then it's just defined($dispatch{$value}).
In reply to Re^2: Using Number Ranges in a Dispatch Table
by tobyink
in thread Using Number Ranges in a Dispatch Table
by planetscape
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |