- my $now = $fromdate->sub($i); # but you can pick which $maxdays worth
- last if $now->cmp($todate) <= 0;
-
- my @spots = ();
- my $fh = $fp->open($now); # get the next file
+ my @spots;
+ last if $now->cmp($todate) <= 0;
+
+ if ($readback) {
+ my $fn = $fp->fn($now->sub($i));
+ dbg("search using tac fn: $fn $i") if isdbg('search');
+ $fh = IO::File->new("$readback $fn |");
+ } else {
+ $fh = $fp->open($now->sub($i)); # get the next file
+ dbg("search fn: $fp->{fn} $i") if isdbg('search');
+ }