Copy(&PL_op, &LvTARGOFF(sv), 1, OP*);
XPUSHs(sv);
#else
- XPUSHs((SV*)op);
+ XPUSHs((SV*)PL_op);
#endif
RETURN;
}
}
}
}
- if (!rx->nparens && !global)
- gimme = G_SCALAR; /* accidental array context? */
safebase = (((gimme == G_ARRAY) || global || !rx->nparens)
&& !PL_sawampersand);
safebase = safebase ? 0 : REXEC_COPY_STR ;
PUTBACK; /* EVAL blocks may use stack */
goto play_it_again;
}
+ else if (!iters)
+ XPUSHs(&PL_sv_yes);
LEAVE_SCOPE(oldsave);
RETURN;
}
DIE("panic: do_subst");
strend = s + len;
- maxiters = (strend - s) + 10;
+ maxiters = 2*(strend - s) + 10; /* We can match twice at each
+ position, once with zero-length,
+ second time with non-zero. */
if (!rx->prelen && PL_curpm) {
pm = PL_curpm;