Web page! Ah... this sounds like we may have CGI problems to consider.

In the shebang line, you probably need to explicitly state the location of your Perl compiler, including the drive. Your Web server might find Perl if it's in your path, but I wouldn't be willing to place bets on it. On my local box (Win98, ActiveState, and Apache), I found that if I change my shebang line from #!C:/perl/bin/perl.exe -Tw to #!perl/bin/perl.exe -w, it still runs. However, C:/perl/bin is in my path, so that may have something to do with it.

Don't worry about the slashes with Perl. Perl uses the forward slash as a path separator, despite Windows using the back slash. This allows for greater portability.

What do you mean your script says "Done" at the bottom? That sounds to me like you are running it through a DOS window instead of a browser. If so, are you using the object-oriented style of CGI.pm (are you using CGI.pm)? If not, you can't pass name=value pairs through on the command line (used when you debug from the command line) which may possibly interfere with your script's execution (i.e. it can't process parameters that it doesn't receive). Another issue: sometimes CGI scripts are required to be run through a browser (they may be checking whether or not you've properly authenticated, for example). If so, you'll need to find where such issues arise and develop some debugging routines to deal with this.

Incidentally, since it sounds like you are running it through a DOS window, I suspect you are invoking it with something like perl somescript.cgi. If so, you should be getting an error message saying Too late for "-T" option at somescript.cgi line 1. If not, you're not using taint checking. That's probably not going to stop your script from running, but it will be a huge security hole.

Lastly: if you are running the script through the command line, I strongly suggest that you learn how to use the debugger. You may hate it now, but it will quickly become one of your best friends. If you learn to use it, you will probably find your problem immediately.

Cheers,
Ovid


In reply to (Ovid) Maybe Converting Unix to NT is a CGI problem instead? by Ovid
in thread Converting Unix to NT by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.