in reply to
Finding if a file is open
It appears you are trying to do this under Windows. If so, have a look at the module
Win32::SharedFileOpen
which appears to do what you want.
Comment on
Re: Finding if a file is open
Download
Code
In Section
Seekers of Perl Wisdom