in reply to
print and extract the line
I think you can also use "$." in place of "$count" in your code.
"man perlvar"
$. Current line number for the last filehandle accessed.
Comment on
Re: print and extract the line
In Section
Seekers of Perl Wisdom