Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1120065]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found