in reply to I need to determine how a Perl script was invoked
In other cases, you might want to investigate what the parent process' command line was:$ perl -E 'say -t STDIN ? "interactive":"non-interactive"' interactive
perl -E 'open F, "/proc/".getppid()."/cmdline" or die $!; $_=<F>; tr/\ +0/ /; say' bash -rcfile .bashrc
|
|---|