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