By "my method" I meant using capturing parentheses and $1 to retrieve the match, instead of $#-.
Sorry for any misunderstanding. My quibble was with your use of a dispatch table, not with the rest of your code.
But regardless of that, what's the problem with a long dispatch table?
I have no issue with the use of dispatch tables per se, long or otherwise. What I meant to point out was that there is absolutely no need for a dispatch table in the context of the OP.
dave
In reply to Re^5: Finding out which of a list of patterns matched
by Not_a_Number
in thread Finding out which of a list of patterns matched
by lemnisca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |