diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-03 01:00:27 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-03 01:00:27 +0200 |
commit | 54651e45454c93ffc4da9542c2b950f2d7599de5 (patch) | |
tree | 6350334f96d77258301a433c5cee076446c9b380 /re | |
parent | 368ad7a138daf6f15a2be2a8ef3546f30f643d47 (diff) | |
download | ref-54651e45454c93ffc4da9542c2b950f2d7599de5.tar.gz |
re: Chomp lines before matching them
Diffstat (limited to 're')
-rwxr-xr-x | re | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -65,11 +65,12 @@ for (@references) { local $_; while ($_ = readline $handles{$file}) { $lines{$file}++; + chomp; if ($rx->match($_)) { $loc = $bytes{$file}; last; } - $bytes{$file} += length($_); + $bytes{$file} += length($_)+1; } } else { goto invalid; |