From: Gurusamy Sarathy Date: Mon, 24 May 1999 05:05:19 +0000 (+0000) Subject: return 0 rather than "" when scalar grep has nothing to iterate X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=288ec9e31566cfd8e9a63e1dd3d7e670d6e519b8;p=p5sagit%2Fp5-mst-13.2.git return 0 rather than "" when scalar grep has nothing to iterate on (brings behavior in line with documentation) p4raw-id: //depot/perl@3455 --- diff --git a/pp_ctl.c b/pp_ctl.c index 49db741..19bfb21 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -667,7 +667,7 @@ PP(pp_grepstart) if (PL_stack_base + *PL_markstack_ptr == SP) { (void)POPMARK; if (GIMME_V == G_SCALAR) - XPUSHs(&PL_sv_no); + XPUSHi(0); RETURNOP(PL_op->op_next->op_next); } PL_stack_sp = PL_stack_base + *PL_markstack_ptr + 1;