【发布时间】:2017-12-29 13:45:14
【问题描述】:
我有一个 Perl 6 代码,我正在执行以下操作:
if ($line ~~ /^\s*#/) { print "matches\n"; }
我收到此错误:
===SORRY!===
Regex not terminated.
at line 2
------> <BOL>�<EOL>
Unable to parse regex; couldn't find final '/'
at line 2
------> <BOL>�<EOL>
expecting any of:
infix stopper
这是 Perl 5 代码的一部分:
if ($line =~ /^\s*#/)
过去它可以很好地识别具有可选空格和# 的行。
是什么导致 Perl 6 中出现此错误?
【问题讨论】: