The flock() system call does not work over NFS, the fcntl() system call does lock files over NFS. The perl flock() function can be configured at compile time to either use the flock() system call or the fcntl() system call (it will default to using flock() if available). Offhand, I forget which variable to change to do this, but I've done it before so I'm sure it's documented in a relatively easy to find location.