Mercurial > hg > egg-tcls
comparison fetch_weather.pl @ 452:ec97c29768e7
fetch_weather: Improve some debug messages.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 06 Oct 2017 17:30:06 +0300 |
parents | aa8cc5b67585 |
children | 721a56cd62e3 |
comparison
equal
deleted
inserted
replaced
451:a7249db002bd | 452:ec97c29768e7 |
---|---|
511 | 511 |
512 my @fmatches = ($dline =~ /\s*([\+\-]?\d+\.\d*|NaN)\s*/ig); | 512 my @fmatches = ($dline =~ /\s*([\+\-]?\d+\.\d*|NaN)\s*/ig); |
513 if (scalar(@fmatches) != scalar(@fmitems)) | 513 if (scalar(@fmatches) != scalar(@fmitems)) |
514 { | 514 { |
515 print STDERR "Not enough items in scalar line #".$nline." (". | 515 print STDERR "Not enough items in scalar line #".$nline." (". |
516 scalar(@fmatches). " vs ".scalar(@fmitems)."): ".$dline."\n"; | 516 scalar(@fmatches). " vs ".scalar(@fmitems)."): ".$dline."\n" |
517 if (opt_get_int("debug") > 0); | |
517 } | 518 } |
518 else | 519 else |
519 { | 520 { |
520 my $vtmp = {}; | 521 my $vtmp = {}; |
521 for (my $fni = 0; $fni < scalar(@fmitems); $fni++) | 522 for (my $fni = 0; $fni < scalar(@fmitems); $fni++) |
536 } | 537 } |
537 } | 538 } |
538 } | 539 } |
539 else | 540 else |
540 { | 541 { |
541 print STDERR "Position and data line counts do not match.\n"; | 542 print STDERR "Position and data line counts do not match ". |
543 scalar(@position_lines)." <> ".scalar(@data_lines)."\n"; | |
542 goto skip_it; | 544 goto skip_it; |
543 } | 545 } |
544 # XXX Hashify the array into lat/long keys | 546 # XXX Hashify the array into lat/long keys |
545 | 547 |
546 # This is horrible :S | 548 # This is horrible :S |