in reply to
Kill a perl script execution in windows
You can use named events. They are kernel events so they persist across processes.
You create the event in the first script and when the latter script loads you check for the event's existance. If it already exists then you know that there is another instance already loaded.
$event = Win32::Event->new([$manual, [$initial, [$name]]])
Constructor for a new event object. If $manual is true, you must manua
+lly reset the event after it is signalled (the default is false). If
+$initial is true, the initial state of the object is signalled (defau
+lt false). If $name is omitted or undef, creates an unnamed event obj
If $name signifies an existing event object, then $manual and $initial
+ are ignored and the object is opened. If this happens, $^E will be s
+et to 183 (ERROR_ALREADY_EXISTS).