在文件中的字符串替换期间,我无法避免用于解析的注释行(以 * 开头的行)。请帮我处理我的代码。
`perl -pi.bak -e "$_ =~/[#.*]*/; /s/PATTERN/REPLACEMENT STRING/g" Test.txt`;
我在 Eclipse、Windows XP 中使用 Perl。
我收到以下错误消息:
Number found where operator expected at -e line 6, near "* LAST UPDATED 09/15"
(Might be a runaway multi-line // string starting on line 1)
(Missing operator before 15?)
Bareword found where operator expected at -e line 6, near "1994 AT"
(Missing operator before AT?)
在此先感谢 Perl 新手