This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test perl #4289
authorFather Chrysostomos <sprout@cpan.org>
Sun, 25 Nov 2012 22:28:25 +0000 (14:28 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 27 Nov 2012 15:05:03 +0000 (07:05 -0800)
commit00f6437b30bbbd24904cbecfa1c00ab91f7315e5
tree16a917d72499b24c34459c81d1c4822ea5e4430f
parentaaee23ae9c2dfc4e671dcc6a11a59f9baf00f533
Test perl #4289

This was fixed by the disabling of PL_sawampersand a few commits ago.

The output used to be like this:

$ perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$&|, "\n"'
e
$ perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$`|, "\n"'
h
$ perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$'\''|, "\n"'
l

Now it’s like this:

$ ./perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$&|, "\n"'
b
$ ./perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$`|, "\n"'
a
$ ./perl -e '$_ = "abc"; /b/g; $_ = "hello"; print eval q|$'\''|, "\n"'
c
t/re/pat_rt_report.t