in reply to Print 5 lines before and after pattern match from a list
especially the updated code shows a very flexible and generic solution.
and since nobody seems to have mentioned it here before: Your praxis to use $_ as outer loop-var is prone to very hard to find ugly bugs.
|
|---|