1. Various detail changes to remove some more warning with -w on
[spider.git] / perl / Geomag.pm
index 1a118fe07a869d5d60efb020556bda7180928092..8b0d2ea7f4cd0933757ed90f6ac68d174ca9bd3b 100644 (file)
@@ -140,7 +140,7 @@ sub forecast
 #
 # This command outputs a list of n lines starting from line $from to $to
 #
-sub print
+sub search
 {
        my $from = shift;
        my $to = shift;
@@ -160,7 +160,7 @@ sub print
                                        if ($search) {
                                                \$count++;
                                                next if \$count < \$from;
-                                               push \@out, print_item(\$ref);
+                                               push \@out, \$ref;
                                                last if \$count >= \$to;                  # stop after n
                                        }
                                }
@@ -169,8 +169,7 @@ sub print
        $fp->close;                                      # close any open files
 
        my $fh = $fp->open(@date); 
-LOOP:
-       while ($count < $to) {
+       for ($count = 0; $count < $to; ) {
                my @in = ();
                if ($fh) {
                        while (<$fh>) {
@@ -178,7 +177,7 @@ LOOP:
                                push @in, [ split '\^' ] if length > 2;
                        }
                        eval $eval;               # do the search on this file
-                       return ("Spot search error", $@) if $@;
+                       return ("Geomag search error", $@) if $@;
                        last if $count >= $to;                  # stop after n
                }
                $fh = $fp->openprev();      # get the next file