added stat/cluster and stat/msg commands
[spider.git] / perl / Geomag.pm
index d68e724d436214b64825b2052164122e22628397..225cb542f087155c84bbe7c2cd9a487dc20bbc10 100644 (file)
@@ -14,7 +14,7 @@ use DXVars;
 use DXUtil;
 use DXLog;
 use Julian;
-use FileHandle;
+use IO::File;
 use Carp;
 
 use strict;
@@ -44,7 +44,7 @@ sub init
 # write the current data away
 sub store
 {
-       my $fh = new FileHandle;
+       my $fh = new IO::File;
        open $fh, "> $param" or confess "can't open $param $!";
        print $fh "# Geomagnetic data parameter file last mod:", scalar gmtime, "\n";
        print $fh "\$date = $date;\n";
@@ -155,7 +155,7 @@ sub search
        $eval = qq(
                           my \$c;
                           my \$ref;
-                          for (\$c = \$        #in; \$c >= 0; \$c--) {
+                          for (\$c = \$#in; \$c >= 0; \$c--) {
                                        \$ref = \$in[\$c];
                                        if ($search) {
                                                \$count++;