in reply to Locking File for copy

One thing you should be aware of, and keep in mind, is that file locking in Perl is advisory only. That is, even if you open a file in locking mode, there is nothing to stop some other script or process from clobbering the file if it isn't observing file locking.

Programming Perl (aka - The Camel, 3rd Edition) has a very good discussion on File Locking in Chapter 16 (beginning on page 419), with plenty of examples. If you have a copy, then I'd thoroughly recommend reviewing this.

Failing that, there is always the flock documentation, as well as some discussion on file locking in the DB_File documentation.

Hope this helps,
Darren