Perl and CGI
By giving the server, files that are executable, some clever bleeders can tap into your server and cause havoc. There are safeguards for this but be aware. PHP is safer for server side scripts.
Perl is straight forward to install, and should run with Apache fairly quickly.
1. Download the latest from www.perl.org.
Install it to c:\perl. Go with all of the defaults.
3. If Perl is working, double clicking on hello.cgi will open a dos command window, execute the script then close the window.. good, its working but not very useful. To see what is happening you need to open a dos command window, through the start menu>programs>MS Dos prompt.
4. At the prompt 'type perl -h' (without the quotes). A scree of help commands should come up. If 'bad file name' comes up then you must add the Perl directory to your path in your autoexec.bat file. If you installed Perl to c:/perl then at the prompt type 'c:/perl/perl -h', this should work, if not there is something wrong with the Perl installation.
5. By using cd to change directories to where you saved the hello.cgi, type 'perl hello.cgi' and html of hello world should scree past (or 'c:/perl hello.cgi' if the path isn't set). The dos command window is a useful, though awkward place, to debug scripts.
6. If you are running the server on your machine then the following should
work: In your internet browser click on hello.cgi. You should see;
information for Websalive
Postal address: Scotland, UK: 113 Comiston Road,
Edinburgh, EH10 6AQ
Electronic mail: Support, Sales, General Information:
Last modified: August 14, 2006