My first bit of advice is to include the following into every Perl script:
-
use strict;
-
use warnings;
-
You will find that there are a number of people here who won't touch your script unless you have these in there. By using them, you will be able to correct a lot of the simple coding mistakes that beginners make and allow us to better tackle the real issue(s) at hand.
As for your Perl script (this is before looking at Ron's version, I don't see anything in your script that says "I am CGI" other than your reference of the ENV hash. To output to the screen you will really need to use the CGI module as Ron has done.
There are plenty of tutorials on CGI in Perl on the internet, you just have to Google them. I would also highly recommend you get a copy of "Learning Perl'" from O'Reilly. It is a wonderful introduction into the world of Perl and I always keep a copy within reach.
Regards,
Jeff