Try running it from the command line to see what's going wrong, and/or check the error logs. Maybe your script doesn't have the right permissions or the path to the perl executable is wrong, or you have windows linefeeds, or any other standard CGI problem.