Perl Shell - A Solution

$prompt = $ENV{'PSH_PROMPT'} || 'psh> ';

This line is used to define our initial prompt. Either we are going to pull the prompt 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 prompt someday.