in reply to Re: search and extract lines which contain a word
in thread search and extract lines which contain a word

Slight typo in the file handles code:
open($fh_out, '<', $qfn_out)
Should read::
open($fh_out, '>', $qfn_out)