summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@aas.no>2006-01-27 06:46:00 -0800
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-02 11:14:42 +0000
commitcfc4a7da389202132834a0ef4ed2d46dd167c176 (patch)
treeae77ff805a66e190133b5ffc15238751f0c72ca1 /pp_hot.c
parentf9c6ae86dc1f6723c795186e5f64836b2e6c2f01 (diff)
downloadperl-cfc4a7da389202132834a0ef4ed2d46dd167c176.tar.gz
Re: $, and say
Message-ID: <lrek2t1e8n.fsf@caliper.activestate.com> with tweaks so "say;" continues to default to $_ plus a regression test p4raw-id: //depot/perl@29187
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index be69c99942..d1873b2a32 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -752,7 +752,11 @@ PP(pp_print)
if (MARK <= SP)
goto just_say_no;
else {
- if (PL_ors_sv && SvOK(PL_ors_sv))
+ if (PL_op->op_type == OP_SAY) {
+ if (PerlIO_write(fp, "\n", 1) == 0 || PerlIO_error(fp))
+ goto just_say_no;
+ }
+ else if (PL_ors_sv && SvOK(PL_ors_sv))
if (!do_print(PL_ors_sv, fp)) /* $\ */
goto just_say_no;