PP(pp_grepwhile) ... if (gimme == G_SCALAR) { // Scalar context dTARGET; XPUSHi(items); // Choose the scalar that gets returned. } else if (gimme == G_ARRAY) SP += items; RETURN; } ...