my goal was maintainability, if speed mattered, I'd move the declaration of the rules and rulesets out of the sub. redefining them each time is useless.
Also using regex-refs via qr// is faster, but code-refs allow implementing more complex rules if requirements change.
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery