in reply to Perl file editing
Also, instead of creating a new version of a question, you should edit the original one. Read How do I change/delete my post? for details.
To show the neighbouring lines, you can use a "sliding window", i.e. always keep three lines in memory. If the middle one matches the criterion, show the other two and ask the user for confirmation.
|
|---|