I'm currently writing a script of which only one instance may run at any time, on Windows. I'd like to achieve this by checking all current running processes for instances of the script which are still active, just after the script is launched, then quitting if any are found.
The problem in the code example that I've tried (which uses Win32::PerfLib), perl processes are simply labelled "Perl" and don't include any script name or parameter information so it's impossible to identify what script each instance of Perl is running.