- Perl ›
- Predefined variable ›
- here
Get process ID $$
Use the predefined variable "$$" to get the process ID .
my $process_id = $$;
The process ID is an identifier assigned when the process is started so that the OS can uniquely identify the process.