in reply to looking for perl module which returns if a file is open

AFAIK there's no module that does this, so I'd just go for parsing the output of lsof; something like:
my @opened_by_X = grep /^X\s+/,split /\n/,`/usr/sbin/lsof`;
Ofcourse nobody's stopping you from turning this into a module yourself. :-)

Joost.

-- #!/usr/bin/perl -np BEGIN{@ARGV=$0}s(^([^=].*)|=)()s; =Just another perl hacker\