]> git.nbdom.net Git - nb.git/commitdiff
missing old option renamed
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 10 Apr 2023 01:04:58 +0000 (03:04 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 10 Apr 2023 01:04:58 +0000 (03:04 +0200)
bin/html2csv

index f78fa2248ba11d6a99129c2592ab6927c32e9b4a..e34658f219213ea0fa8b33df46d23a3067f43034 100755 (executable)
@@ -29,7 +29,7 @@ my $DEBUG = $main::DEBUG = 0;
 
 my %Opt = (
   'num' => undef,
-  'print_num' => 0,
+  'print-num' => 0,
   'tag' => 'table',
   'exp1'=> '',
   'exp2'=> '',
@@ -82,7 +82,7 @@ for my $table ($html =~ m,<${T1}${exp1}[^>]*>(.*?)<\s*/\s*${T1}\s*>,gi) {
   $table = "<>$table</>" unless $T2;
   for my $tr ($table =~ m,<(${T2})${exp2}[^>]*>(.*?)<\s*/\s*${T2}\s*>,gi) {
     my @col;
-    print "$table_num " if $Opt{print_num};
+    print "$table_num " if $Opt{'print-num'};
 
        $tr = "<>$tr</>" unless $T3;
        my $count = 0;