i am trying to create a counter that works in the following way:
<img src="http://mysite.com/myfile.cgi" />...
I know very little about PERL, but I have found a tutorial that allows me to do the following:
taken from http://www.htmlgoodies.com/beyond/cg...le.php/3470131
This is a very simple counter CGI. It returns a bitmap image count, like the one above. The process is this:

* The page is requested by a server.
* There is a codeword on the page that contacts the CGI.
* The CGI checks in a "counts" directory for a file named after that code word.
* If the file exists, the CGI adds one to the count in the file and returns the bitmap image of the count.
* If the file doesn't exist, the CGI creates it starting the count at 1.

So, we need to create two things: The cgi-bin (if you don't already have one) and a directory where this CGI can keep record of all your counts.
Now, what I want to do is, instead of save this information to a file, I want to store it in a database. So, rather than check for a file in a directory, I would like to check for a field in the table in my database...
Also, this tutorial seems really old, so I need some better info on:
1. How to write the script
2. How to get the script working on my shared hosting account

Any info is appreciated. Thanks