in reply to Line(s) extraction

Rather than bothering with $., why not just print the line containing the regex and then 3 more lines?

#! perl -sw use strict; while( <DATA> ) { next unless m[two]; print; print scalar <DATA> for 1..3; } __DATA__ one two three four five six

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail