http://qs1969.pair.com?node_id=198245


in reply to (it's dumb) Re: DON'T USE THIS CODE
in thread File::DumbLock

One example strategy could be unlink: you try to delete something and check for the result. If you succeeded, you obtained the lock. This approach makes things more complicated for stale locks...

Ciao, Valerio

update: thanks podmaster for the hint.