From: Matthew Vernon Date: Sat, 21 Aug 2021 12:55:25 +0000 (+0100) Subject: Decrement $. when making concordance X-Git-Tag: archive/debian/4.35~2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~matthewv/git?a=commitdiff_plain;h=eb10cbf4107afd90a74f68b16d32e33bc6726d58;p=bible-kjv.git Decrement $. when making concordance The previous fix to using the rawtext file (rather than the output of bible) correctly discarded the header line. It didn't, however, adjust $. (line count), which is used to build the concordance. So we need to store $. -1 in the concordance. Thanks to Christian Weisgerber for the report. --- diff --git a/makeconc.pl b/makeconc.pl index cf3edeb..6ccc32d 100755 --- a/makeconc.pl +++ b/makeconc.pl @@ -52,7 +52,8 @@ while () { next if $stopword{$word}; $count{$word}++; # Move below next line to count per-line. next if $seenonthisline{$word}++; - $lines{$word} .= " " . $.; + #the header line discard still leaves $. 1 higher than we want + $lines{$word} .= " " . ($. - 1); } } die $! if BIBLE->error();