Something like this (UNTESTED) should work:
my ( @buffer, @data ); while ( <LOG_FH> ) { if ( /(DATE_PATTERN)/ ) { push @buffer, [ $., $1 ]; shift @buffer if @buffer > 8; } if ( /SEARCH_PATTERN/ && @buffer && $buffer[ 0 ][ 0 ] == $. - 8 ) +{ push @data, [ $buffer[ 0 ][ 1 ], $_ ]; } }
In reply to Re: jump lines in log file
by jwkrahn
in thread jump lines in log file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |