You must be using a version of perl that is less than v5.18, as this behaviour works for me on 5.18+, and is documented as such in v5.18 perldelta... search for "The use re 'eval' pragma".
In reply to Re^3: Compiling Regular Expressions
by stevieb
in thread Compiling Regular Expressions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |