Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Quote: TStanley If I remember correctly, both Windows and Unix look on the shebang line for any switches passed in(i.e. the -w or -i switches) Not exactly; under Unix the shell cares for the shebang, but the Windows shells (cmd.exe, command.com) don't know anything about shebangs (only cygwin knows, off course). Perl itself cares for the parameters like -w, -n, -i, -p, .... Quote: wolfi ~ servers (even those on localhost windows) may require it. (My apache gets upset when i omit my #!C:\perl\bin\perl.exe line.) For Apache 1.3, there exists an option in httpd.conf which is called ScriptInterpreterSource registry. If you activate this line, Apache looks for the file extention when executed as CGI (e.g. cgi), looks up in the registry what to do with a files with the extention .cgi ... well, execute it with perl... and does it. Then you can use whatever shebang you like. I like to use this when I'm developing webpages under Windows where the production server is Linux/Unix. Another benefit is that you can test more perl-versions by just assigning another perl-interpreter to .cgi or .pl and need not changing ton's of files... Btw: You can associate an ending with an interpreter under windows in the shell the following way: (Dont forget the " in ftype, or you will get funny results if there are spaces within the paths...) For Apache2 there exists a similar command, but I don't know it by heart
Best regards, In reply to Re: Re: Using Perl, some Windows version and #!usr/bin/perl, WHY?
by strat
|
|