httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Passaniti" <jp...@rochester.rr.com>
Subject RE: More help with apache and CGI-Perl
Date Mon, 01 Jul 2002 14:44:24 GMT
> Thank you. If #!/path/to/interpreter_or_shell
> only works on unices what is the equivalent 
> for Windows ? 

Click on any file that ends in ".html" and (normally) Internet Explorer
will pop up and load that file.  Click on any file that ends in ".txt"
and (normally) Notepad will pop up with that file loaded.  How does this
work?  Windows maintaining a table that associates file extensions to
their application.  When you installed Perl, a proper installation of
Perl should have associated ".pl" with the Perl executable.

> I've done a lot of Perl 
> programming in Windows 
> and never used a SHEBANG line; I
> thought that  it was necessary 
> for running Perl scripts as CGI 
> scripts .

The "#!" is only used by Unix (and Unix-like) operating systems.  When
the operating system tries to load the file, it looks at the first few
bytes, and if it finds "#!" then it assumes the path to a suitable
interpreter follows.

Windows doesn't use this mechanism to associate files to their
executables.  You can completely ignore the shebang line under Windows
(because Windows itself ignores it).



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message