Jos Boumans writes ..
>Actually, its something YOU need to tell your server, so it knows where
>perl is
>
>the #! is called a shebang and basicly tells your computer where to
>find perl
>
>an example
>
>#!c:\perl\bin\perl is what you should type if you installed perl on
>a wintendo in c:\perl (bin\perl is simply perls subdir to put the
>interpreter)
>
>so: #!your\path\to\perl will tell your machine what it needs to know...
>especially important for .cgi scripts and the like!
I just wanted to clarify that most Windows programs don't need the shebang
line at all .. windows works off filename extensions - not shebang lines
so it's only really important under Apache in Windows which still requires a
shebang line .. or in cygwin or a shell that's been ported to Windows or
something else unusual like that
>Kevin Williams wrote:
>
>> I'm just starting out and I've come across a line of code
>> that no book seems to explain. Its seems that I should put
>> #!/usr/local/bin/perl at the start of every script but it doesn't
>> work for my script. How do I find out what the correct line should
>> be? I'm writing a guest book so is it something that my server would
>> need to tell me?
myself .. and I'm sure several others .. when on UNIX systems that we're not
familiar with do something like this .. in vi you just type the command
:0r!which perl
that's zero 'r' bang .. this will put the right location of Perl into your
file on the top line .. then just prepend the #! characters to the line
other editors have different commands to do the same thing .. in the worst
case you might need to drop to a shell and issue the 'which perl' command
then manually copy-paste the string into your code
--
jason king
It is illegal to "annoy a bird" in any city park of Honolulu, Hawaii.
- http://dumblaws.com/