in reply to Problem writting to a database (db)

Although I'm guessing at what kind of file a ".db" file is (Exim?), it looks like this question is answered in perlfaq5 - and I quote:
How do I change one line in a file/delete a line in a file/insert a +line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distri +bution since Perl 5.8.0.