getppid

Note for Linux users: on Linux, the C functions getpid()
and
getppid() return different values from different threads. In order to
be portable, this behavior is not reflected by the Perl-level function
getppid(), that returns a consistent value across threads. If you want
to call the underlying getppid(), you may use the CPAN module
Linux::Pid
.

perldoc.perl.org - Official documentation for the Perl programming language