PERL CGI Tutorial
for Writing Interactive Form Scripts
Getting Started in CGI
This tutorial will use a little different approach to teaching CGI. We'll won't bore you with information about what CGI is or whether it's a programming language or not. You can get that everywhere else. We'll provide you with blocks of code called CGI scripts that you can cut and paste together to create larger scripts. If you want the technical information you should check out the other guys.
How to Test Scripts on a PC
Want to test your Perl, PHP, MySQL scripts on your PC?
You need to install a localhost server.
Go to IndigoStar, download and install Indigo AMPP.
Then download Blumentals HTMLPad 2010. It will sync up with your localhost, right out of the box. (See tutorial below )
Download Your Free Trial of HTMLPad 2010 Today
Download Free Trial Now!
The Free Trial is fully functional. Try it for 30 days or 30 sessions. If you can't do it, you don't buy it. NO RISK!! The web server is FREE.
Using HTMLPad 2010 with IndigoAMPP
See: Localhost Server
Then read my tutorial on setting up your server to work with the HTMLPad 2010 html editor.
This Tutorial
This CGI tutorial will teach you to build and execute CGI scripts in a Windows environment. The tutorial is designed to be used with the Apache server for Windows. If you haven't installed it yet you must do so before you can execute CGI scripts on your PC for testing purposes.
We will be creating scripts using Perl which is only one of several tools used to develop interactive websites..
This tutorial will not be an exhaustive study of Perl, but rather an introduction to basic techniques of the language as they relate to CGI.
Security
The CGI scripts that you develop here can be uploaded to a UNIX server and will run with little or no adjustment. You should not use the scripts for processing sensitive information, until you have done some research on internet security and are familiar with the necessary precautions that must be taken to protect that data. We have provided some simple techniques in the CGI scripts which will provide a little security. Most of this responsibilty lies with your web host.
The Future of Interactive Websites
The information in this part of our website should be considered outdated for the purposes of creating interactive websites. It might be interesting to know how we once provided a way for our website visitors to communicate with us, but the future of interactive websites is CMS.
We held off on recommending CMS for years because the technology was in its infant development stages. It was hard to install, hard to learn, hard to use, poorly documented and just not a good choice for first time website authors. That has changed in the last couple of years.
Today, CMS is provided at no extra charge by most web hosts. It can be installed automatically. The one we recommend, Joomla!, is well documented and fairly easy to learn. For more on CMS Click Here
Contents
Home
Send HTML Page to Browser
Parse HTML Form
Saving to a File
Open a File and Display Contents
Using the Split Function
Search a File
Sort a File
Display a Multi Line File in Tables
Display a Multi Line File in a Textarea
Working with Numbers
Using Sendmail
Need Web Hosting?
We Recommend these products
Free Flash Websites
