in reply to updating/modifying line in a file

check Tie::File.

Enjoy,
Mickey