Message-ID: <15573.56062.264379.981864@ix.netsoft.ro>
p4raw-id: //depot/perl@16421
;
}
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);
}
skip_all("Tests mostly usesless on MacOS") if $^O eq 'MacOS';
-plan(tests => 20);
+plan(tests => 21);
my $Perl = which_perl();
is( scalar `$Perl -le "print 'ok'" | $Perl -e "print <STDIN>"`,
"ok\n", 'extra newlines on outgoing pipes');
+
+ {
+ local($/) = \2;
+ $out = runperl(prog => 'print q{1234}');
+ is($out, "1234", 'ignore $/ when capturing output in scalar context');
+ }
}