Win32::GetCurrentProcessId() Returns the process identifier of the current process. Until the process terminates, the process identifier uniquely identifies the process throughout the system. The current process identifier is normally also available via the predefined $$ variable. Under fork() emulation however $$ may contain a pseudo-process identifier that is only meaningful to the Perl kill(), wait() and waitpid() functions. The Win32::GetCurrentProcessId() function will always return the regular Windows process id, even when called from inside a pseudo-process.