in reply to Internal Server Error!

Additonally to looking at the error logs and running it from the command line. Try to use:
#!/usr/bin/perl -wc
To make sure that your syntax is good. Then follow by using:
#!/usr/bin/perl -w
The warning flag will alert you as to what module is failing or if anything else might be a problem. If you do not have access to the command line on the webserver, you might want to check with the local system administrator (unless that is you) to make sure that modules that this script uses are installed on the production machine that will execute your script.

Good Hunting,
kha0z