in reply to Re^2: IIS6 + Perl CGI: finding locations on disk
in thread IIS6 + Perl CGI: finding locations on disk
Like I already said, my server provides the document root in $ENV{DOCUMENT_ROOT}. Check your server's documentation or just dump the environment variables
#!/usr/bin/perl use strict; use warnings; use List::Util qw( max ); print("Content-Type: text/plain\n\n"); my $max_size = max map length, keys %ENV; my $format = "%-" . ($max_size+1) . "s %s\n"; for (sort keys %ENV) { printf($format, "$_:", $ENV{$_}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: IIS6 + Perl CGI: finding locations on disk
by rgcosma (Beadle) on Sep 13, 2008 at 17:36 UTC |