Perl Shell - A Solution

$shell = $ENV{'SHELL'} || 'csh';

This line is used to define which Unix shell to use to run any Unix commands. Either we are going to pull the shell from the environment, or, if that has no value, we are going to use a default. This line is positioned near the top of the script because we may wish to reconfigure the default shell someday.