develooper Front page | perl.perl5.porters | Postings from April 2006

[perl #3637] s///m flag leaks into /e evaluation

Thread Next
From:
Steve Peters via RT
Date:
April 17, 2006 13:14
Subject:
[perl #3637] s///m flag leaks into /e evaluation
Message ID:
rt-3.0.11-3637-132346.7.34816403663494@perl.org
> [hv@crypt.compulink.co.uk - Fri Aug 04 00:48:26 2000]:
> 
> Trawling through old messages, I note that this bug is still present
> in bleadperl:
> 
> ref: http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-
> 03/msg00972.html
> 
> crypt% ./perl -w
> sub newchar { "X\nY" =~ /^Y/ ? "bad" : "good" }
> 
> $s1 = $s2 = "ABC";
> $s1 =~ s/B/newchar/e;
> $s2 =~ s/B/newchar/em;
> print $s1 eq $s2 ? "ok 1\n" : "not ok 1  # -$s1-$s2-\n";
> __END__
> not ok 1  # -AgoodC-AbadC-
> crypt%
> 

This problem seems to have gone away as well.  This could be related to
the fix accidentially provided by change #27270 and RT #24704 "Regex
replace looses chars".

bash-3.00$ perl rt_3637.pl
not ok 1 # -AgoodC-AbadC-
bash-3.00$ ./perl rt_3637.pl
ok 1



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About