# HG changeset patch # User Matti Hamalainen # Date 1449864978 -7200 # Node ID 19b363586b4019e65d8150a338d7680b1886f61f # Parent 0f55bbb7fea35001ad6443f9b9f56c80310ca43c fetch_weather: Fix debug prints. diff -r 0f55bbb7fea3 -r 19b363586b40 fetch_weather.pl --- a/fetch_weather.pl Fri Nov 27 13:46:01 2015 +0200 +++ b/fetch_weather.pl Fri Dec 11 22:16:18 2015 +0200 @@ -419,13 +419,13 @@ # This is horrible :S my $fcrap = $fdata->{"om:featureOfInterest"}{"sams:SF_SpatialSamplingFeature"}{"sams:shape"}{"gml:MultiPoint"}{"gml:pointMember"}; + my $nrecords = 0; foreach my $xnode (@{$fcrap}) { my $floc = $xnode->{"gml:Point"}; if ($floc->{"gml:pos"} =~ /^\s*([\+\-]?\d+\.\d*)\s+([\+\-]?\d+\.\d*)\s*$/) { my ($flat, $flong) = ($1, $2); - my $nrecords = 0; # Should use a hash - foreach my $flol (@farray) @@ -445,9 +445,9 @@ ]; } } - print STDERR $nrecords." records from FMI.\n" if (opt_get_int("debug") > 0); } } + print STDERR $nrecords." records from FMI.\n" if (opt_get_int("debug") > 0); } else { # defined print STDERR "Invalid XML received:\n";