Just another Perl shrine | |
PerlMonks |
Re: Print 5 lines before and after pattern match from a listby bitingduck (Chaplain) |
on Mar 14, 2015 at 16:33 UTC ( [id://1120063]=note: print w/replies, xml ) | Need Help?? |
Edit: I managed to create a dummy file that printed according to what jayu_rao wanted, despite the double use of the counter noticed by hdb! ----original post below---- Are your caught lines not just too close together? Try adding the marker and counter that I put in below and look at the results. Also, if you make the match case insensitive you can compress the first three patterns into one. I tested it with the dummy file in the spoiler: <Reveal this spoiler or all in this thread>
In Section
Seekers of Perl Wisdom
|
|