Cache the part you are interested in
my @cache; my $found=0; while (<$file>) { if ( ... found the match ...) { $found++; } if (/^<DataStart>/) { @cache=(); } push(@cache, $_); if (/^<DataEnd>/ and $found) { Do_stuff_with_match(@cache); $found=0; } }
In reply to Re: Match on line, read backwards to opening xml tag then forward to closing tag
by jethro
in thread Match on line, read backwards to opening xml tag then forward to closing tag
by shadowfox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |