Bug#615028: bogus 'Search pattern not terminated' messages

Niko Tyni ntyni at debian.org
Sat Apr 9 07:49:45 UTC 2011


On Fri, Feb 25, 2011 at 10:07:44AM +0800, jidanni at jidanni.org wrote:
> Package: perl
> Version: 5.10.1-17
> Severity: wishlist
> 
> Please output the right error message.
> $ perl -cwe 's!(.)!$1[/G]!;'
> Else no one will figure out that they need to do
> Search pattern not terminated at -e line 1.
> $ perl -cwe 's!(.)!$1\[/G]!;'
> -e syntax OK

The error message is not bogus. The parser is looking for the /G'th
element of the array @1, but /G is an unterminated search pattern.

perl -e '$1[/G]'
perl -e /G

I don't think Perl can be expected to guess what you mean in this case.
-- 
Niko Tyni   ntyni at debian.org






More information about the Perl-maintainers mailing list