On Fri, Sep 16, 2016 at 04:15:13AM -0700, Ed Avis wrote: > # New Ticket Created by "Ed Avis" > # Please include the string: [perl #129283] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=129283 > > > > > This is a bug report for perl from eda@waniasset.com, > generated with the help of perlbug 1.40 running under perl 5.22.2. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > Currently this gives a run-time warning, but no compile-time error: > > use 5.022; > $_ = 'abc'; > s/(a)/x$1$2/; > say; > > If the regexp on the LHS of s/// is known at compile time, then the > number of capturing groups it contains is known. Under 'use strict', > a mention in the RHS of a capture variable which doesn't have a > corresponding capturing group (like $2 in the above example) > should give a compile-time error. > "use strict" never promotes a 'Use of uninitialized value' to an error. I don't think perl being consistent when it comes to s/// is a bug. AbigailThread Previous | Thread Next