Another way is to set up a simple queue:
my $string = ... my @queue; push @queue, scalar <$FH> for (1..8); while (my $line = <$FH>){ push @queue, $line; my $target = shift @queue; getdate($target) if $line =~ /$string/; } sub getdate{ ...
In reply to Re: jump lines in log file
by hangon
in thread jump lines in log file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |