Beefy Boxes and Bandwidth Generously Provided by pair Networks
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:

assoc .pl=Perl assoc .cgi=Perl ftype Perl="D:\Programs\gnu\perl809\bin\perl.exe" "%1" %*
(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,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"


In reply to Re: Re: Using Perl, some Windows version and #!usr/bin/perl, WHY? by strat
in thread Using Perl, some Windows version and #!usr/bin/perl, WHY? by muba

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-03-29 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found