summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorRadu Greab <radu@netsoft.ro>2002-05-06 07:23:10 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-06 01:09:24 +0000
commitfa326138e0db34ae4a0161fbe7c05eb9a9367825 (patch)
tree4f3ce4e083fca91e5f8551ae442b0a33aec802c9 /pp_sys.c
parent43a739c2bdff3ef2c4add9ac59ee447ec3f7849e (diff)
downloadperl-fa326138e0db34ae4a0161fbe7c05eb9a9367825.tar.gz
Re: [ID 20020504.006] $s=`command` fails if $/=\integer
Message-ID: <15573.56062.264379.981864@ix.netsoft.ro> p4raw-id: //depot/perl@16421
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 0183325cb9..c55f0a4651 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -321,10 +321,13 @@ PP(pp_backtick)
;
}
else if (gimme == G_SCALAR) {
+ SV *oldrs = PL_rs;
+ PL_rs = &PL_sv_undef;
sv_setpv(TARG, ""); /* note that this preserves previous buffer */
while (sv_gets(TARG, fp, SvCUR(TARG)) != Nullch)
/*SUPPRESS 530*/
;
+ PL_rs = oldrs;
XPUSHs(TARG);
SvTAINTED_on(TARG);
}