summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pp_hot.c b/pp_hot.c
index eb166f943b..5981a5d7a4 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1494,8 +1494,10 @@ Perl_do_readline(pTHX)
}
if (gimme == G_SCALAR) {
/* undef TARG, and push that undefined value */
- SV_CHECK_THINKFIRST_COW_DROP(TARG);
- (void)SvOK_off(TARG);
+ if (type != OP_RCATLINE) {
+ SV_CHECK_THINKFIRST_COW_DROP(TARG);
+ SvOK_off(TARG);
+ }
PUSHTARG;
}
RETURN;
@@ -1556,8 +1558,10 @@ Perl_do_readline(pTHX)
}
}
if (gimme == G_SCALAR) {
- SV_CHECK_THINKFIRST_COW_DROP(TARG);
- (void)SvOK_off(TARG);
+ if (type != OP_RCATLINE) {
+ SV_CHECK_THINKFIRST_COW_DROP(TARG);
+ SvOK_off(TARG);
+ }
SPAGAIN;
PUSHTARG;
}