chiark / gitweb /
Check error() return
authorMatthew Vernon <matthew@debian.org>
Mon, 19 Jul 2021 11:35:09 +0000 (12:35 +0100)
committerMatthew Vernon <matthew@debian.org>
Mon, 19 Jul 2021 11:35:09 +0000 (12:35 +0100)
It's not very useful calling BIBLE->() without checking the output.

makeconc.pl

index c3e5bb810c3c4cf7145ff40f18a39fa88688b245..cf3edebca39107112170f10f710d39902c504b07 100755 (executable)
@@ -55,7 +55,7 @@ while (<BIBLE>) {
        $lines{$word} .= " " . $.;
     }
 }
-BIBLE->error();
+die $! if BIBLE->error();
 
 # Create raw concordance, listing the lines where each word occurs.