fix probelm writing to wrong type of filehandle in genstats
authorminima <minima>
Sun, 9 Sep 2001 16:25:00 +0000 (16:25 +0000)
committerminima <minima>
Sun, 9 Sep 2001 16:25:00 +0000 (16:25 +0000)
perl/Spot.pm

index 11ffdfa41344254622620ecd9492e0e2941cff8b..be8be669c8d9e8899210163112c805551cb10d7b 100644 (file)
@@ -384,7 +384,7 @@ sub genstats($)
                for ($i = 0; $i < @freq+2; $i++) {
                        $tot[$i] ||= 0;
                }
-               $out->write(join('^', 'TOTALS', @tot) . "\n");
+               $statp->write($date, join('^', 'TOTALS', @tot));
 
                for (sort {$list{$b}->[0] <=> $list{$a}->[0]} keys %list) {
                        my $ref = $list{$_};
@@ -392,9 +392,9 @@ sub genstats($)
                        for ($i = 0; $i < @freq+2; ++$i) {
                                $ref->[$i] ||= 0;
                        }
-                       $out->write(join('^', $call, @$ref) . "\n");
+                       $statp->write($date, join('^', $call, @$ref));
                }
-               $out->close;
+               $statp->close;
        }
 }