in reply to Re: Re: Premature Error using CGI.pm
in thread Premature Error using CGI.pm

Assuming, of course, you're on win32. I think both win32 and apache/win32 use the shebang line for command line options (-wT of course), but not to find the perl exe. On my unix (Solaris/Linii) boxen, a bad shebang path doesn't run, command line or cgi. On win32, it doesn't matter. Does YMV?.

a

  • Comment on Re: Re: Re: Premature Error using CGI.pm

Replies are listed 'Best First'.
shebang lines (Re: Premature Error using CGI.pm)
by tye (Sage) on Feb 25, 2001 at 01:04 UTC

    On every platform, Perl uses the #! line to get options. But if Perl is the first one to get the -T option from the #!, then -T won't work (you'll get the "too late" error). Win32 doesn't use the #! at all. I've heard that Apache can be configured either way on Win32, but by default uses the #! line (and that agrees with my limited experience).

            - tye (but my friends call me "Tye")
      Okay, maybe I underspoke - perl on win32 uses the shebang line to get command line options, that is to say: a perl script on win32 w/ line 1 as:
      #!/usr/bin/perl -w
      doesn't care that /usr/bin/perl doesn't exist but, assuming you're doing:
      perl myscript_with_shebang.pl
      will use the '-w' for the script. However, -T will be 'too late' on win32.

      a