kkavitha has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl project, one of the module in this project is writing some data into a file(specific to host). While running this project more than once at the same time, data in the file gets collpased. Because, more than one process is writing to the file at the same time. How to lock the file handle of that file? How to unlock the file handle once writing/reading done?

Thanks N Advance, Kavitha

  • Comment on Avoid multiple process writing to a file at the same time

Replies are listed 'Best First'.
Re: Avoid multiple process writing to a file at the same time
by ccn (Vicar) on Sep 30, 2009 at 11:15 UTC
Re: Avoid multiple process writing to a file at the same time
by BioLion (Curate) on Sep 30, 2009 at 11:39 UTC