in reply to How to get the shell script name

You could getppid and then search the process list, but it would be a lot easier if you passed it to the script, or exported it in the shell script so that the perl script could find it in %ENV.

Caution: Contents may have been coded under pressure.