This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pp_substr: combine two identical blocks of code
[perl5.git] / pp_hot.c
index 2241c31..c20fb05 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2226,15 +2226,8 @@ PP(pp_subst)
        && (!doutf8 || SvUTF8(TARG)))
     {
        if (!matched)
-       {
-           SPAGAIN;
-           if (rpm->op_pmflags & PMf_NONDESTRUCT)
-               PUSHs(TARG);
-           else
-               PUSHs(&PL_sv_no);
-           LEAVE_SCOPE(oldsave);
-           RETURN;
-       }
+           goto ret_no;
+
 #ifdef PERL_OLD_COPY_ON_WRITE
        if (SvIsCOW(TARG)) {
            assert (!force_on_match);