Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2018-11-14 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (171 votes). Check out past polls.

    Notices?