diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-19 01:21:22 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-19 01:21:22 +0000 |
commit | f7e33566f09bd09e2a30db0e6835322b7f19bbd2 (patch) | |
tree | b6b6487ea87c0ba6bb0412178e3b4b230590625b /pp_hot.c | |
parent | 7c1f0a780f6c3c384f7ab3ab896781a54a658b5f (diff) | |
download | perl-f7e33566f09bd09e2a30db0e6835322b7f19bbd2.tar.gz |
make failed matches return empty list in list context
p4raw-id: //depot/perl@1542
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -853,8 +853,6 @@ PP(pp_match) } } } - if (!rx->nparens && !global) - gimme = G_SCALAR; /* accidental array context? */ safebase = (((gimme == G_ARRAY) || global || !rx->nparens) && !sawampersand); safebase = safebase ? 0 : REXEC_COPY_STR ; @@ -958,6 +956,8 @@ play_it_again: PUTBACK; /* EVAL blocks may use stack */ goto play_it_again; } + else if (!iters) + XPUSHs(&sv_yes); LEAVE_SCOPE(oldsave); RETURN; } |