in reply to problems using Windows server

Since you are double quoting the windows path, this section of code should be written like:

my %list = ("http://www.mysite.com/away/index.html" => "D:\\inetpub\\wwwroot\\017172\\1sdhpnc1\\trial.h +tml" );

(Escape your backslashes)

Sincerely,

Replies are listed 'Best First'.
Re^2: problems using Windows server
by Anonymous Monk on Feb 11, 2005 at 16:10 UTC
    Thanks, that looks sensible and I have incorporated it. However the problem seems to be in the use commands.

    I found this 'hello world' script on the server and added the use cgi::carp line which is commented out. It runs like this, but with the comment hash taken out I get the same error message. I hope this helps to ring a bell for someone...

    #use CGI::Carp qw(fatalsToBrowser warningsToBrowser); print "Content-Type: text/html\n\n"; print "<HTML>\n"; print "<HEAD>\n"; print "<TITLE>Hello World</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "<H4>Hello World</H4>\n"; print "<P>\n"; print "Your IP Address is $ENV{REMOTE_ADDR}.\n"; print "<P>"; print "<H5>Have a nice day</H5>\n"; print "</BODY>\n"; print "</HTML>\n";
      Try just using CGI alone;

      Then just CGI::Carp()
        I did better than that! I removed all the references to CGI as spurious!

        This has removed the software error (Why, anybody?)

        I now get the server message:
        'D:\inetpub\wwwroot\017172\1sdhpnc1\cgi-bin\cm_update.pl' script produ +ced no output
        Once again I have just tested in unix and it works okay. What could be the problem? (I have checked that LWP::Simple resides on the server...
Re^2: problems using Windows server
by gaal (Parson) on Feb 11, 2005 at 20:30 UTC
    Forward slashes work fine for most calls on Windows, so you can keep your Unix code there.

    If you want to write really portable code, you can use File::Spec->catfile() to join path elements.