good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: How do I lock a file?by danstuken (Novice) |
on Aug 01, 2007 at 13:23 UTC ( [id://630046]=note: print w/replies, xml ) | Need Help?? |
Note: if you you will truncate the file before you have it locked, this may not be what you want in a production system! Use before you get the lock and then truncate() if you want to, er, truncate the file once its locked. Or lock a separate semaphore file who's contents are unimportant.
In Section
Seekers of Perl Wisdom
|
|