This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #17542] regex confusion
authoryves orton <unknown>
Fri, 17 Nov 2006 07:40:15 +0000 (23:40 -0800)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 17 Nov 2006 20:12:20 +0000 (20:12 +0000)
From: "yves orton via RT" <perlbug-followup@perl.org>
Message-ID: <rt-3.5.HEAD-32013-1163778013-580.17542-15-0@perl.org>

p4raw-id: //depot/perl@29309

t/op/subst.t

index d6e5f51..b9428e0 100755 (executable)
@@ -7,7 +7,7 @@ BEGIN {
 }
 
 require './test.pl';
-plan( tests => 134 );
+plan( tests => 135 );
 
 $x = 'foo';
 $_ = "x";
@@ -571,4 +571,14 @@ TODO:{
     s/(((((((((x)))))))))(y)/${10}/;
     is($_,"y","RT#6006: \$_ eq '$_'");
 }
+{
+    my $want=("\n" x 11).("B\n" x 11)."B";
+    $_="B";
+    our $i;
+    for $i(1..11){
+       s/^.*$/$&/gm;
+       $_="\n$_\n$&";
+    }
+    is($want,$_,"RT#17542");
+}