On Wednesday, Sep 24, 2003, at 11:39 US/Pacific, Bill Teschek wrote:


HTH,
    Thanks for responding. My questions at this point are more in
line with how  to get a script file to work with perl on our webserver.
I'm been doing static HTML for years now but have just never ventured
into cgi and perl stuff.

that is clearly good news. Trying to make the Hop to HTML and cgi and perl all at once would drive one BATTY. Everyone starts somewheres and you have started in the right place.

I'm hoping I can get some of the basics down right away
to get a simple mailto form working on our site fairly quickly.

Why Code when you can download:


cf: <http://nms-cgi.sourceforge.net/scripts.shtml>

specifically I would use the TFMail - as it is
both GOOD perl code, and will give you an introduction
to how 'not a simple thing' managing a 'mailto' form
has to be - unless one wants every Spammer in the Free World
using your web-site as an open relay...

One question I have is about the first line
of perl scripts:

#! etc etc.

I have not been able to find any explanation anywhere of how that works.
Is that strictly a Unix thing, and if so, how does a MS server know
where to find perl in order to run the script.
[..]

yes, that is known in the unix world, amongst
other things as the 'SheBang' - it indicates to
the 'shell' which interpretor should be invoked
to read the rest of the text as 'code'.

you might want to spin through

<http://aspn.activestate.com/ASPN/Perl/>

{ WOW! way too much stuff there at times, hum... }

what you can do is run the

perl.exe my_new_file.pl

where you have put your perl CGI code into
the file 'my_new_file.pl' and it should give
you the output.

Unix geeks would of course have done say

perl ./my_new_file.plx

but the basic idea is that anything that the Web Server
is going to 'execute for you' you can basically do by
hand at the command line.

How the Web Server 'knows' which perl to invoke is a
part of the configuration issues. In the Unix world
with the

        #!/usr/bin/perl -w
        use strict;

as the first too opening lines - all one has to do is
put it in a file my_code.cgi - and the webserver 'knows'
that anything ending in 'cgi' will simply be executed.
I'll defer to someone with more IIS tuning time for
the details on whether it is using the 'file name suffix'
to invoke the perl processor on it - or which.

HTH





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to