Move the initialization of $/ just after switch parsing
(it was done after yyparse().)
p4raw-id: //depot/perl@18015
}
}
switch_end:
+ sv_setsv(get_sv("/", TRUE), PL_rs);
if (
#ifndef SECURE_INTERNAL_GETENV
PL_e_script = Nullsv;
}
-/*
- Not sure that this is still the right place to do this now that we
- no longer use PL_nrs. HVDS 2001/09/09
-*/
- sv_setsv(get_sv("/", TRUE), PL_rs);
-
if (PL_do_undump)
my_unexec();
require "./test.pl";
-plan(tests => 19);
+plan(tests => 20);
# due to a bug in VMS's piping which makes it impossible for runperl()
# to emulate echo -n (ie. stdin always winds up with a newline), these
);
is( $r, 'abc-def--ghi-jkl-mno--pq-/', '-0777 (slurp mode)' );
+$r = runperl(
+ switches => [ '-066' ],
+ prog => 'BEGIN { print "($/)" } print "[$/]"',
+);
+is( $r, "(\066)[\066]", '$/ set at compile-time' );
+
# Tests for -c
my $filename = 'swctest.tmp';