demerphq wrote: > On 1 August 2010 21:19, Father Chrysostomos <sprout@cpan.org> wrote: >> A slightly simpler case: >> >> $ perl -le '$_="CCCGGG"; s!.!@a{print("[$&]"),/./}!g' >> [C] >> [C] >> [C] >> [C] >> [C] >> [C] >> >> What’s happening is that the s/// does not reset PL_curpm for each iteration, because it doesn’t usually have to. >> >> The RHS’s scoping takes care of it most of the time. This happens with the /e modifier and with @{...}. >> >> In this example, though, we have a subscript, not a block. This subscript is in the same scope as the s/// itself. >> >> The assumption that the substitution operator will never have to reset PL_curpm itself appears to be incorrect. The attached patch fixes it. > > Hi, thanks for the patch. Im a little concerned that this might have > deeper consequences than at first meet the eye, could we hold off on > this one until we know more? How will we find out more? > > Yves > > >Thread Previous | Thread Next