Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Print 5 lines before and after pattern match from a list

by bitingduck (Chaplain)
on Mar 14, 2015 at 17:01 UTC ( #1120065=note: print w/replies, xml ) Need Help??


in reply to Re: Print 5 lines before and after pattern match from a list
in thread Print 5 lines before and after pattern match from a list

The OP and your second update are reminders of why and how it's preferable to avoid C style loops in Perl. Perl's looping tools make C loops easy enough to avoid, and using C loops is an easy way to produce hard to notice but annoying bugs.

  • Comment on Re^2: Print 5 lines before and after pattern match from a list

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1120065]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-09-22 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (190 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!