sub script_name { return $ENV{'SCRIPT_NAME'} if defined($ENV{'SCRIPT_NAME'}); # These are for debugging return "/$0" unless $0=~/^\//; return $0; }