in reply to Check whether a file is open

Not really a Perl answer, but on most Unixes (and Linux) you can use the utility lsof(8). Example:
lsof /etc/passwd
Will tell you whether /etc/passwd is currently opened by another process, the pid of that process and a whole lot of other useful stuff.
lsof +D /etc
will give you all open files in a directory.
lsof -p 12345

will give you all files opened by the process with the pid 12345.

Apply your favourite variant of backticks or open to examine the output in Perl.

Hmm, given that there's no Perl wrapper module for lsof in CPAN (and Linux::Fuser is Linux-only), maybe it'd be worthwhile writing one?