问题描述:
在执行perl脚本的时候遇到如下问题:
Unescaped left brace in regex is illegal here in regex; marked by <– HERE in m/${ <– HERE ([^ \t=:+{}]+)}/ at xxx line xxx
原因分析:
原因是Perl不支持以前的写法。
解决方案:
将报错位置遇到的第一个左大括号,用中括号包起来。例如:
将 - $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
修改为 - $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;