separator

Take a quiz or make one of your own
What It's All About

Our first tutorial will be a very basic introduction to Perl and CGI programming, although strictly speaking there won't even be any CGI involved in it.

What we'll be doing is very simple. Setting up a file on the server with a number in it. Then setting up a program to run from the command line, aka telnet.

The program will open the file for input and output, read the current contents, i.e. the number we put in there to start with. Then it'll add one to that number and write the result back to the file. Server side counting.

Why would you want to do this? Because once you get this simple program running, it's just a matter of adding enough CGI to it to have it run off your own webpage. If the program gets executed each time your webpage is hit, then voila!, you've got a hit counter.

separator

© www.thecgibin.com