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

Bug or feature?

Thread Next
From:
John Imrie
Date:
August 27, 2016 11:15
Subject:
Bug or feature?
Message ID:
08021547-1143-adc5-63d5-34bfceb289f0@virginmedia.com
I'm not sure if this is a bug or a feature

Perl version 5.24.0 on Windows, Strawberry Perl

This works

no warnings "experimental::regex_sets";

$q = qr/(?[ ( ( [ABC] - [B] ) + ( [abc] - [b] ) ) + [def] ])/;

However

no warnings "experimental::regex_sets";

$q = qr/(?[ ( [ABC] - [B] ) + ( [abc] - [b] ) + [def] ])/;

fails with Unexpected binary operator '+' with no preceding operand in 
regex; marked by <-- HERE in m/(?[ ( [ABC] - [B] ) + ( [abc] - [b] ) + 
<-- HERE  [def] ])/

I would have though that the second option should work.


John


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