We don't bite newbies here... much | |
PerlMonks |
Print n lines after a matched lineby sreek3502 (Novice) |
on Jun 13, 2018 at 18:14 UTC ( [id://1216577]=perlquestion: print w/replies, xml ) | Need Help?? |
sreek3502 has asked for the wisdom of the Perl Monks concerning the following question: I have an input file having following contents SCHEDULE "TEST" DESCRIPTION "Do Some stuff" MINUTE "53" HOUR "21" SCHEDULE "DUMMY CHECK" DESCRIPTION "Do some stuff" Check something INTERVAL "10m" MINUTE "50" HOUR "21" I need to match the 3rd line after the matched line SCHEDULE "DUMMY CHECK" which is INTERVAL "10m". I have written the below code for that purpose, however i'm not sure if this is the exact way of doing it, or do we have any simple other logics.
Back to
Seekers of Perl Wisdom
|
|