http://qs321.pair.com?node_id=1104546


in reply to No need to escape right brace in regex

With Perl 5.18.2 on a Ubuntu 14.04 box I don't seem to get any error if I replace the double quotes for single quotes around the code, but when I try to reproduce the behavior in the cases you report (a.k.a escaping the brace or leaving it unescaped ) I get the following error

perl -le "$_=~/sub mymy\{}/;" syntax error at -e line 1, near ";=~" Execution of -e aborted due to compilation errors.

The error is consistently reported in all the cases you mentioned in your follow-up reply too


A 4 year old monk