ENV variables question

i have this perl script which checks out a couple of ENV type variables .. why is it that 'SCRIPT_FILENAME' keeps coming back as blank/undefined?

server_name and scriptname is returning fine.

Running Perl5 on NT4 IIS.
------------------------
#!/usr/local/bin/perl

print "Content-type: text/html\n\n";
print "<html><head></head><body>\n";
print "Your path is working and pointing to Perl version:<p>\n";
print "<B>$]</B><p>\n";
print "The complete path to this script is:<p>\n";
print "<font color=red><B>$ENV{'SCRIPT_FILENAME'}</B></font><p>\n";
print "The relative URL of this script (used in forms) is:<p>\n";
print "<B>$ENV{'SCRIPT_NAME'}</B>\n";
print "Your server returns the following domain name for your site:<p>\n";
print "<B>$ENV{'SERVER_NAME'}</b><p>\n";
print "</body></html>\n";

exit;
erikleeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kim RyanIT ConsultantCommented:
Try $ENV{'SCRIPT_NAME'}
0
erikleeAuthor Commented:
erh..actually that one  is already in the script. what won't work is SCRIPT_FILENAME.
0
Kim RyanIT ConsultantCommented:
SCRIPT_FILENAME is not one of the CGI session variables. What data are you hoping to see in SCRIPT_FILENAME? See
http://stein.cshl.org/WWW/software/CGI/#environment
0
jhurstCommented:
As has been said, not all servers provide them all.  I would suggest that you imnplement env.cgi so you can see what your server has.  Here is a copy of it:

#!/usr/bin/perl

###########################################################################
#                     environment_variables.cgi                           #
#                                                                         #
# This script was written by Selena Sol (selena@eff.org                   #
# http://www.eff.org/~erict) having been inspired by countless other      #
# perl authors.  Feel free to copy, cite, reference, sample, borrow or    #
# plagiarize the contents.  However, please let me know where it goes so  #
# that I can at least watch and take part in the development of the       #
# memes. Information wants to be free, support public domain freware.     #
#                                                                         #
# Version: 2.0                                                            #
# Last Modified: 5-12-96                                                  #
# Description: This script will output all of the environment variables   #
#      available for use                                                  #  
# Usage: This script must be placed in a directory which allows cgi       #
#      executables and must have its permissions set such that the web    #
#      server has permission to execute it.                               #
#                                                                         #
###########################################################################

# First, print out the HTTP header.

  print "Content-type: text/html\n\n";

# Create a list of environment variables by gathering all the "keys" in the
# %ENV associative array.

  @environment_variables = keys (%ENV);

# For ever environment variable in the @environment_variables list, print
# the variable and then print its associated value.  Then quit.

  foreach $environment_variable (@environment_variables)
    {
    print "$environment_variable = $ENV{$environment_variable}<BR>\n";
    }
  exit;

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
erikleeAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.