$$
- $PROCESS_ID
- $PID
- $$
The process number of the Perl running this script. You should consider this variable read-only, although it will be altered across
fork()calls.Note for Linux users: on Linux, the C functions
getpid()andgetppid()return different values from different threads. In order to be portable, this behavior is not reflected by$$, whose value remains consistent across threads. If you want to call the underlyinggetpid(), you may use the CPAN moduleLinux::Pid.Mnemonic: same as shells.