develooper Front page | perl.perl5.porters | Postings from May 2016

Re: [perl #128213] No deprecation warning on literal left curlybracket in /.{/ etc

Thread Previous | Thread Next
From:
Zefram
Date:
May 24, 2016 23:06
Subject:
Re: [perl #128213] No deprecation warning on literal left curlybracket in /.{/ etc
Message ID:
20160524230620.GF16984@fysh.org
demerphq wrote:
>$ perl -wle'qr/\A{10}/'
>
>Quantifier unexpected on zero-length expression in regex m/\A{10}/ at -e line 1.

That's just a warning.  It does actually parse as I stated.

>should probably do something like reduce any quantifier on an
>assertion to something like ? (IOW, 0 or 1).

That would be a sensible optimisation, but has essentially nothing to
do with whether it's syntactically permitted to attach a quantifier
directly to an assertion.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About