in reply to Re^2: file lock errorin thread file lock error
From the documentation to which I linked,
import them from the Fcntl module, either individually, or as a group using the ':flock' tag.
Add
use Fcntl qw( :flock ); [download]
as in the example