flock() is Perl's shortcut to
lockf(), which is in turn a shortcut to
fcntl()'s locking capabilities.
File locks are maintained by the OS, not by the program. The program simply requests a lock from the OS by making a call to flock(). So, as
grantm pointed out already, you're safe as long as all programs play by these rules and use flock(), or lockf(), or fcntl(), or whatever the equivalent may be.
--perlplexer