use warnings; use strict; my $i = -1; my @chunks; while (<DATA>) { ++$i if /^\[.+?\] \[[A-Z]+\]/; $chunks[$i] .= $_ if $i >= 0; } print grep { /DBPoolSQLException/ } @chunks;
In reply to Re: Parsing a file in "chunks"
by repellent
in thread Parsing a file in "chunks"
by vxp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |