Hmm. I just re-tried the script, and it ran fine. Did you copy it exactly, make it an executable perl script, and place it in your server's cgi-bin directory? I guess you would have to modify the shebang line to point at your /usr/bin/perl.
WRT your script, this line:
print &PrintVariables(%in);This is the difficult line
makes no sense. You are passing a reference to an undefined subroutine that is taking an undefined hash as an argument. Where do you think the values for these are supposed to come from?
Also, in perl *ALWAYS*
... and ...
#! /usr/bin/perl -w
These things are there to help you find bugs before you post to the internet for help.