Click to See Complete Forum and Search --> : Okay im TOTALLY new to cgi, please help.
Cease
Sep 19th, 2000, 09:56 AM
Right this is probably the easiest thing to do, but im a total newbie to perl/cgi and i know absolutly nothing about it.
Okay i want to know how you call cgi scripts from html pages, or dont you do this. Basically i have a mail script that i want to be activated when someone logs onto the page, can some one please help?
btw i was thinking along the lines of <script></script> is this wrong???
Thanx
Cease
Well,
you can use <script></script>
but that is for PerlScript
<script language="perlscript">
#do crap here
</script>
a "real" way to have a perl page is something like this
#!usr\bin\perl #physical path to perl
#do some crap here
All perl pages start with #!path-to-perl, which is the path to perl on your server..
not the virtual path, but the physical path, like you would do on your computer.
# donates a comment BTW.. one of the only exceptions is with #!user\bin\perl....
HarryW
Sep 20th, 2000, 10:21 PM
Depends on what kind of thing you want to do. If you want to write some PerlScript functions that are used when you click buttons, on loading the window, that kind of thing, then you use this format:
<SCRIPT LANGUAGE="PerlScript">
#your code, as Dennis said, goes here
</SCRIPT>
If you want to use a function library file, calling functions from it, you use:
<SCRIPT LANGUAGE="PerlScript" SRC="filename"></SCRIPT>
Or, if you want to compile a CGI executable that delievers a page of HTML (and possibly scripts) as its output, then I'm not quite sure but I think you set up a directory to be executable (usually called cgi-bin) and use the filename of your CGI executable as your page name.
To me it looks like you want option 1 or 2.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.