File::Flock is a wrapper around the flock() call. The only thing it does that is special is that it creates the lock file if the lock file does not already exist. It will also try to remove the lock file. This makes it a bit complicated. To install File::Flock use the following: perl Makefile.PL make make test make install Under perl5.002, the make test will emit some warnings about "9" and "99" not being numeric values. I believe this is a bug in perl.