in reply to internal server error- cant find error

Work through the list of suggestion at CGI Help Guide and Troubleshooting Perl CGI scripts and you'll find your problem.

Also, use #!/usr/bin/perl -- for shebang