> The assignment of $ENV{SCRIPT_NAME} to $cgi *shouldn't* require that you set
> up anything in the preferences.  

Correct.

> The script name is set up in the
> environment automatically by Perl when the script is launched, although your

It is set by the web server.  

> For grins, try writing a little Perl program that only displays the script
> name property:
> 
>      print "$ENV{SCRIPT_NAME}\n";
> 
> which should tell you if MacPerl is properly setting that environment
> variable up when it launches the script.
 
Make sure you are running through your web server, not just invoking the
script from the shell.

> Do you know what version of Perl your MacPerl is based on?  It's also
> possible that the SCRIPT_NAME environment variable was introduced in a later
> version of Perl...I'm no Perl guru, so I couldn't comment on when it
> appeared...

Environment variables are not set by *perl*, they are set by the operating
environment.  Generally speaking, all of the environment variables you
encounter are set by the web server you are using.  $ENV{} allows you to
access those values from within Perl.


Reply via email to