NAME

File::Flock - file locking with flock

SYNOPSIS

use File::Flock;

lock($filename);

lock($filename, 'shared');

lock($filename, undef, 'nonblocking');

lock($filename, 'shared', 'nonblocking');

unlock($filename);

DESCRIPTION

Lock files using the flock() call. If the file to be locked does not exist, then the file is created. If the file was created then it will be removed when it is unlocked assuming it's still an empty file.

AUTHOR

David Muir Sharnoff, <muir@idiom.com>