I did not know that pids in Windows were negative.
solved the problem. Unfortunately, I need this module because the code snippet I posted is part of a larger project that needs Win32::OLE->GetObject function. Do you know what causes this incompatibility? Is there a way in Perl to use a module for a part of the program and disable it for the rest rather than defining it in a global scope?