How does my script know if its running under Perl for Win32 or PerlIS?
PerlIS sets an environment variable, PERLXS, for scripts that are executed under PerlIS. The following script will run as a perl.exe CGI script or as a PerlIS script. It checks the environment variable to see if it needs to print out a status line. print “HTTP/1.0 200 OK\r\n” if $ENV{PERLXS} eq “PerlIS”; print <<"END"; Content-Type: text/htm
PerlIS sets an environment variable, PERLXS, for scripts that are executed under PerlIS. The following script will run as a perl.exe CGI script or as a PerlIS script. It checks the environment variable to see if it needs to print out a status line. print “HTTP/1.0 200 OK\r\n” if $ENV{PERLXS} eq “PerlIS”; print <<"END"; Content-Type: text/html