Replace wrong line counting with $.

This patch has no tests, as the line counting is
only used in debugging and error handling.

Change-Id: I022ca8dd086c85a2deca20d28e2ccfb5fe53df88
diff --git a/script/tei2korapxml b/script/tei2korapxml
index d2ceb6e..3875200 100755
--- a/script/tei2korapxml
+++ b/script/tei2korapxml
@@ -224,12 +224,6 @@
 
   my ( $pfx, $sfx );
 
-  # TODO:
-  #   Replace all calls of $lc with $. or $input_fh->input_line_number,
-  #   because otherwise remove_html_comments will
-  #   move the lines forward without incrementing.
-  my $lc = 0; # line counter (only for error handling and debugging)
-
   my $tl = 0; # text line (needed for whitespace handling)
 
   $input_fh = *STDIN;  # input file handle (default: stdin)
@@ -255,8 +249,6 @@
 
   while ( <$input_fh> ){
 
-    $lc++; # line counter
-
     # TODO: yet not tested fo big amounts of data
     # must-have, otherwise comments in input could be fatal (e.g.: ...<!--\n<idsHeader...\n-->...)
     remove_xml_comments( $input_fh, $_ ); # remove HTML comments (<!--...-->)
@@ -271,7 +263,7 @@
 
       $pfx = $1; $sfx = $2;
 
-      die "ERROR ($0): main(): input line number $lc: line with closing text-body tag '${_TEXT_BODY}'"
+      die "ERROR ($0): main(): input line number $.: line with closing text-body tag '${_TEXT_BODY}'"
         ." contains additional information ... => Aborting\n\tline=$_"
           if $pfx !~ /^\s*$/ || $sfx !~ /^\s*$/;
 
@@ -457,7 +449,7 @@
 
       $data_fl = 1;
 
-      die "ERROR ($0): main(): input line number $lc: line with opening text-body tag '${_TEXT_BODY}'"
+      die "ERROR ($0): main(): input line number $.: line with opening text-body tag '${_TEXT_BODY}'"
         ." contains additional information ... => Aborting\n\tline=$_"
           if $pfx !~ /^\s*$/ || $sfx !~ /^\s*$/;
 
@@ -467,7 +459,7 @@
       $pfx = $1;
       my $content = "$2\n";
 
-      die "ERROR ($0): main(): input line number $lc: line with opening header tag"
+      die "ERROR ($0): main(): input line number $.: line with opening header tag"
         ." is not in expected format ... => Aborting\n\tline=$_"
           if $pfx !~ /^\s*$/;