I have a file which currently is editable from two different scripts. It is not clear to me (after reading perldocs) whether I can effectively lock the file by applying flock to calls in both scripts, or whether I should endeavour to make one script a subroutine of the other, to allow flock to function.
Perhaps there is a particular way this might be approached? I would be grateful for any enlightenment.