in reply to How do I know if a file is used by another process?
If you're only worried about multiple copies of your program accessing the same file, you can use file locking perldoc -f flock, otherwise you could parse the output of lsof (assuming lsof is installed on your machine).
In Section
Seekers of Perl Wisdom