in reply to Exec or system functions

in complete agreement with clintp, that the pid file creation and file locking is about as standard as can be. The only problem is that it only works if a the program in question creates the pid file everytime, or is always started by the same application. If this is Win32 specific, checkthe Win32 modules on CPAN, as there are a few that do basic OLE work.

For simpler programs, where OLE is not available, and findWindow style functions are not used (for whatever reason), the last would be reading the process list. This is a few of the things i can think of, including the downsides to a few.
OH, a sarcasm detector, that’s really useful