comparison parsedata.pl @ 146:1a5994671dcf

Oops. Fix a silly 10L.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 10 Sep 2014 12:53:30 +0300
parents c028506aa9cc
children c0c69b3b1f7d
comparison
equal deleted inserted replaced
145:c028506aa9cc 146:1a5994671dcf
296 foreach my $b (@{$$h{"nodes"}}) { 296 foreach my $b (@{$$h{"nodes"}}) {
297 if (defined($$b{"nodes"})) { 297 if (defined($$b{"nodes"})) {
298 my $text = $$b{"nodes"}[0]{"text"}; 298 my $text = $$b{"nodes"}[0]{"text"};
299 $text =~ s/\.$//; 299 $text =~ s/\.$//;
300 300
301 if ($text =~ /vuorov/i) 301 if ($text =~ /^vuorov/i)
302 { 302 {
303 $cturns = 1; 303 $cturns = 1;
304 } 304 }
305 else 305 else
306 { 306 {
345 for (my $i = 0; $i < length($cdata); $i += 2) 345 for (my $i = 0; $i < length($cdata); $i += 2)
346 { 346 {
347 push(@$cdata1, $$cdata[$i]) if defined($$cdata[$i]); 347 push(@$cdata1, $$cdata[$i]) if defined($$cdata[$i]);
348 push(@$cdata2, $$cdata[$i+1]) if defined($$cdata[$i+1]); 348 push(@$cdata2, $$cdata[$i+1]) if defined($$cdata[$i+1]);
349 } 349 }
350 $$hourDefs{$cid} = { "turns" => $cturns, "split" => $cgrouped, "start" => $lastHour, "hours" => $chours, "data" => [ $cdata1, $cdata2 ] }; 350 $$hourDefs{$cid} = { "turns" => $cturns, "grouped" => $cgrouped, "start" => $lastHour, "hours" => $chours, "data" => [ $cdata1, $cdata2 ] };
351 } 351 }
352 else 352 else
353 { 353 {
354 $$hourDefs{$cid} = { "turns" => $cturns, "split" => $cgrouped, "start" => $lastHour, "hours" => $chours, "data" => [ $cdata ] }; 354 $$hourDefs{$cid} = { "turns" => $cturns, "grouped" => $cgrouped, "start" => $lastHour, "hours" => $chours, "data" => [ $cdata ] };
355 } 355 }
356 356
357 push(@{$$hourTable{$cday}}, $tid); 357 push(@{$$hourTable{$cday}}, $tid);
358 $totalHours += $chours; 358 $totalHours += $chours;
359 } 359 }