# New Ticket Created by  Theo van den Heuvel 
# Please include the string:  [perl #123323]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123323 >


Version Perl6 2014.09 built on MoarVM 2014.09
Windows 7.


Code

my $string = "ACCB";
for $string {
     s/A (<-[B]>*) B/$0/;
     say $_;
}

produces nog output. However, the next fragment produces "CC" as 
expected.

my $string = "ACCB";
for $string {
     my $mid;
     s/A (<-[B]>*) { $mid = $0 } B/$mid/;
     say $_;
}



-- 
Theo van den Heuvel
Van den Heuvel HLT Consultancy
Malden, The Netherlands
  +31 24 3736356
  +31 625492788

Reply via email to