david@landgren.net (via RT) wrote: > # New Ticket Created by david@landgren.net > # Please include the string: [perl #32840] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=32840 > > [...] > > There do not appear to be any tests that check how $^R should > behave. The following file is an attempt to improve matters. Late night bad wording. There are indeed tests for $^R in t/op/pat.t but they don't exercise patterns with groupings. Playing around some more, the following match, but $^R does not contain what is expected: $^R = undef; ok( 'ac' =~ /^a(?{30})(?:b(?{31})|c(?{32}))?/, 'ac =~ a(?:b|c)?' ); ok( $^R == 32, '$^R == 32' ); $^R = undef; ok( 'abbb' =~ /^a(?{36})(?:b(?{37})|c(?{38}))+/, 'abbbb =~ a(?:b|c)+' ); ok( $^R == 37, '$^R == 37' ) or print "# \$^R=$^R\n"; DavidThread Previous | Thread Next