From: minima Date: Sun, 9 Sep 2001 16:25:00 +0000 (+0000) Subject: fix probelm writing to wrong type of filehandle in genstats X-Git-Tag: R_1_48~35 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8720504a4ba0e0df8fc3932f3eb55a63decc8e9a;p=spider.git fix probelm writing to wrong type of filehandle in genstats --- diff --git a/perl/Spot.pm b/perl/Spot.pm index 11ffdfa4..be8be669 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -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; } }