in reply to Who called Perl?

On Linux it's
$ perl -E 'my $parent = getppid(); open my $fh, "<", "/proc/$parent/comm"; print <$fh>' bash
The proc directory has a number of other interesting files.

Replies are listed 'Best First'.
Re^2: Who called Perl?
by Anonymous Monk on Mar 02, 2015 at 12:45 UTC

    ... with the caveat that orphaned processes get adopted by init (process 1). Might want to test for that.

    Also, there's a potential for race in there.