http://www.perlmonks.org?node_id=178572

kidd has asked for the wisdom of the Perl Monks concerning the following question:

Hello... Im creating a script wich handles a lot of files, and its intended to be used by several people at the same time.

I know there is a way you can lock a file so while its opened no one can edit it at the same time.

I've seen several scripts use flock() but I never used it so I don't know how to.

If someone could point me to a tutorial or give some of the basics of this function it would be great, and if you have another suggestion please tell me...