Mercurial > hg > egg-tcls
comparison fetch_weather.pl @ 367:1ca8ae195077
fetch_weather: Fix parsing of old/cached datafile.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 18 Dec 2015 10:07:35 +0200 |
parents | 3917a1515e31 |
children | ed1c7f2d81df |
comparison
equal
deleted
inserted
replaced
366:1c9a40b47cd5 | 367:1ca8ae195077 |
---|---|
283 my $str = read_file(opt_get("outfile"), binmode => ':utf8', err_mode => 'quiet'); | 283 my $str = read_file(opt_get("outfile"), binmode => ':utf8', err_mode => 'quiet'); |
284 if (defined($str)) | 284 if (defined($str)) |
285 { | 285 { |
286 foreach my $line (split(/\s*\n\s*/, $str)) | 286 foreach my $line (split(/\s*\n\s*/, $str)) |
287 { | 287 { |
288 my @mtmp = split(/\|/, $line); | 288 my @mtmp = split(/\|/, $line, -1); |
289 if (scalar(\@mtmp) >= 3) | 289 if (scalar(\@mtmp) >= 3) |
290 { | 290 { |
291 $weatherdata->{shift @mtmp} = \@mtmp; | 291 $weatherdata->{shift @mtmp} = \@mtmp; |
292 } | 292 } |
293 } | 293 } |