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


in reply to file lock error

The Fcntl constants for flock can be found by browsing the source at cpan Fcntl.pm

use Fcntl qw(:flock);

They are:

'flock' => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)],