in reply to what happens when...

if the files are not locked, which in some cases doesnt matter/work, scripts that read/rewrite files can clash. One script is reading a file that suddenly disappears (rewritten by another script). There are ofcourse ways to prevent it :) Either use flock (on platforms that support it;pray some none flock obeying process doesnt alter your file), or use system calls to avoid I/O errors, roll your own flock routine (a huge NoNo according to many resident monks), or use one of the more advanced file locking modules listed on CPAN.