How do I get the process id for the perl process that's running the current script? getppid() doesn't return the same pid as ps -ea| grep . Is there is an easy way or do I just run the ps -ea command within my script and trim off the other pieces of info?
You can use
In another shell:
To learn more about about special Perl variables: