Note how that code uses the block form of eval, eval { ... }, not the string form eval qr//.
That eval is only there to "protect" you against errors in your regular expression. I'm not sure what the use is in that program as it immediately exits anyway.
You are at least getting tripped up by not understanding the two forms of eval and how they differ. String-eval should rarely be used and regular expressions are not one of these rare cases.
In reply to Re^3: Repeated code blocks in long and hairy regex
by Corion
in thread Repeated code blocks in long and hairy regex
by Polyglot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |