in reply to Storing Info in a text File

The text-based solutions proposed above do not seem to take into account race conditions. What if two processes both read the text file nearly simultaneously? Then they will both attempt to write a row with the same row id and the text file will be corrupted.

Databases handle this problem by locking rows or tables. The first user who reads the data locks it so no one else can read it. He does not release the lock until he is done writing or his write has failed.

It looks to me as if Perl's flock command can get around the race conditions problem, but I do not see anybody using it in their solutions.