$ perl -le '$_="111"; print s/(??{1})/2/ge' This should print 3 but prints 0 Patch: ------------------------------------------------------------------- --- /arc/perl-current/pp_ctl.c 2003-02-16 16:24:51.000000000 +0200 +++ perl-current/pp_ctl.c 2003-02-21 08:40:36.000000000 +0200 @@ -200,7 +200,7 @@ PP(pp_substcont) sv_free(dstr); TAINT_IF(cx->sb_rxtainted & 1); - PUSHs(sv_2mortal(newSViv((I32)cx->sb_iters - 1))); + PUSHs(sv_2mortal(newSViv(saviters - 1))); (void)SvPOK_only_UTF8(targ); TAINT_IF(cx->sb_rxtainted); ------------------------------------------------------------------- #! /usr/bin/perl require "test.pl"; { $_="1111"; is(s/(??{1})/x/eg,4,'#20684 s/// with (??{..}) inside'); } __END__ ------------------------------------------------------------------- Of course, it would be better to do all inside S_regtry, but that's a little bit trickier. Since pp_substcont was already patched to save then restore cxstack->sb_iters ( < 5.8.0 ) , I used that. Regards AdiThread Next