in reply to Windows process

Usually you would handle this type of "single instance" issue with some sort of file locking mechanism. In doing a quick search on CPAN you might consider using Win32::Mutex or File::Flock.

I haven't used either of those as the company I work with has our own in-house module to handle mutex situations.

Here's a quick example (untested):
use File::Flock; # the following croaks if it fails my $lock = new File::Flock("C:\lock_file"); # do whatever here # this will happen automatically once $lock # goes out of scope but it doesn't hurt to do # it explicitly once you're done with the lock $lock->unlock();