in reply to File Locking w/wo NFS
An alternative to file locking is to use atomic updates. I'm pretty sure that NFS supports an atomic rename, so you could use IO::AtomicFile to edit your file, and guarantee that no two processes will write to the file at the same time.
This will prevent file corruption, but it won't guarantee that you won't overwrite a change that was made by another process (ie there is a race condition from the time you read the file to when it gets written and renamed). So it might not be exactly what you need.
- Cees
|
|---|