What you speak of is a race condition, and that is one of the primary reasons for which file locking exists. Without proper file locking, both scripts will blindly write at the same time. With proper locking, one will wait for the other to release its lock. This is documented in the POD under perlfaq8: How can I lock a file?.
Dave
In reply to Re: Locked files (simple)...
by davido
in thread Locked files (simple)...
by reaction
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |