X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=perltest.pl;h=29b808b5293c3979517015689f31fa9ee65bb34a;hb=cef3458b870c4ae76061d6238197dcf96dc9690b;hp=05983a3349a14eada2944f2b32d588b8f30b95c4;hpb=dd986e8b547c0dde924c4b566ad0894ad4f1beb9;p=pcre3.git diff --git a/perltest.pl b/perltest.pl index 05983a3..29b808b 100755 --- a/perltest.pl +++ b/perltest.pl @@ -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; }