laziness, impatience, and hubris | |
PerlMonks |
Re^3: Match on line, read backwards to opening xml tag then forward to closing tagby choroba (Cardinal) |
on Nov 14, 2011 at 23:39 UTC ( [id://938047]=note: print w/replies, xml ) | Need Help?? |
Move the push inside the if block - only cache the lines between the matches. Also, your condition for printing is tested for each line, so the program might print too early - only set a flag and print after the whole record was read if the flag is set.
In Section
Seekers of Perl Wisdom
|
|