in reply to Re: Grab 3 lines before and 2 after each regex hit
in thread Grab 3 lines before and 2 after each regex hit
Your techinque answers the need nicely...
thank you
for(1..$#lines) { if($lines$_=~m/^\d+\d+/){ print qq~ ....... ... ~;
I guess that `pp~' operates something like a here document?
Can you explain a bit?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Grab 3 lines before and 2 after each regex hit
by choroba (Cardinal) on Apr 25, 2014 at 19:36 UTC | |
by HarryPutnam (Novice) on Apr 25, 2014 at 20:26 UTC | |
by choroba (Cardinal) on Apr 25, 2014 at 20:42 UTC | |
by HarryPutnam (Novice) on Apr 25, 2014 at 21:23 UTC |