in reply to modifying a matched line in a flatfile

So, what did Perl say when you tried this? You did turn on warnings, didn't you? ;-)

You might want to take a look at Tie::File. And at the FAQ - your question is found there too.

Abigail