Do you mean something like the command fuser? If so, there is a module on CPAN called Linux::Fuser:
This module provides information similar to the Unix command 'fuser' about which processes have a particular file open. The way that this works is highly unlikely to work on any other OS other than Linux and even then it may not work on other than 2.2.* kernels.
It should also be borne in mind that this may not produce entirely accurate results unless you are running the program as the Superuser as the module will require access to files in /proc that may only be readable by their owner.
Added: If you need instead to parse the output of lsof, use the -F flag that will force the program to produce its output in a format parseable by other programs.
HTH, Valerio
In reply to Re: looking for perl module which returns if a file is open
by valdez
in thread looking for perl module which returns if a file is open
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |