#
# This command outputs a list of n lines starting from line $from to $to
#
-sub print
+sub search
{
my $from = shift;
my $to = shift;
if ($search) {
\$count++;
next if \$count < \$from;
- push \@out, print_item(\$ref);
+ push \@out, \$ref;
last if \$count >= \$to; # stop after n
}
}
$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>) {
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