in reply to Never lock $0 inside of a BEGIN block
You commonly cannot lock a file exclusively if you don't open it for output... Are you sure this isn't a problem?
In Section
Meditations
in reply to Never lock $0 inside of a BEGIN block