$$, $PROCESS_ID, $PID- The process number of the current script / program / executable.
The process number of the current script / program / executable. Natively Perl provieds the $$ variable, but if you load the English module you can also use the $PROCESS_ID or the $PID variable names for the same thing.
See also Forking, Process ID, Parent Process ID, init
examples/process_id.pl
use strict; use warnings; use English qw( -no_match_vars ); print "$$\n"; print "$PROCESS_ID\n"; print "$PID\n";
1228561 1228561 1228561
Published on 2021-02-23
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post