http://qs1969.pair.com?node_id=556935


in reply to find the shell inside a perl script

You need to step back and say what you're trying to accomplish.

If you want some commands to run with a specific shell, explicitly run that shell.

If this is something that's output is being fed back to a parent shell (e.g. you're sourcing the output from it to set environment variables) the way I've seen most things behave is to presume the shell is Borne-ish unless a flag (say, -c) is given on the command line (in which case it spits out csh-y output).