summaryrefslogtreecommitdiff
path: root/corpus/paste-files.pl
diff options
context:
space:
mode:
authorChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2013-01-21 16:53:05 -0500
committerChris Dyer <cdyer@allegro.clab.cs.cmu.edu>2013-01-21 16:53:05 -0500
commite1f71a6ce868d116f04082b697a8d61afcd625f1 (patch)
tree0b026f8f44b5193ff6d9561990e6eada19f7e863 /corpus/paste-files.pl
parent7cac43b858f3b681555bf0578f54b1f822c43207 (diff)
a little bit of cleanup
Diffstat (limited to 'corpus/paste-files.pl')
-rwxr-xr-xcorpus/paste-files.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/corpus/paste-files.pl b/corpus/paste-files.pl
index 0b788386..4cb424ad 100755
--- a/corpus/paste-files.pl
+++ b/corpus/paste-files.pl
@@ -41,9 +41,9 @@ while(1) {
}
warn "$ARGV[$anum]:$lc contains a ||| symbol - please remove.\n" if $r =~ /\|\|\|/;
$r =~ s/\|\|\|/ /g;
- $r =~ s/ +//g;
- $r =~ s/^ //;
- $r =~ s/ $//;
+ $r =~ s/\s+/ /g;
+ $r =~ s/^ +//;
+ $r =~ s/ +$//;
$anum++;
push @line, $r;
}
@@ -56,5 +56,5 @@ for (my $i = 1; $i < scalar @fhs; $i++) {
my $r = <$fh>;
die "Mismatched number of lines.\n" if defined $r;
}
-print STDERR "Bad lines containing ||| were $bad\n";
+print STDERR "Number of lines containing ||| was: $bad\n" if $bad > 0;