chiark / gitweb /
Record pcre3 (2:8.38-3.1) in archive suite sid
[pcre3.git] / perltest.pl
index 05983a3349a14eada2944f2b32d588b8f30b95c4..29b808b5293c3979517015689f31fa9ee65bb34a 100755 (executable)
@@ -80,8 +80,8 @@ for (;;)
     $pattern .= $_;
     }
 
-   chomp($pattern);
-   $pattern =~ s/\s+$//;
+  chomp($pattern);
+  $pattern =~ s/\s+$//;
 
   # The private /+ modifier means "print $' afterwards".
 
@@ -121,6 +121,14 @@ for (;;)
   if ($@)
     {
     printf $outfile "Error: $@";
+    if ($infile != "STDIN")
+      {
+      for (;;)
+        {
+        last if ! ($_ = <$infile>);
+        last if $_ =~ /^\s*$/;
+        }
+      }
     next NEXT_RE;
     }