Inform yourself about whether that web host does regular backups. Maybe you can simply restore from backup.
More information about this error may be available in the server error log.
Have you looked in the error log? Most likely there is information about what went wrong there.
If you have shell access to the machine, you can also try out your Perl script from the command line, and see some error messages directly:
> # Check for compilation
> perl -c that-script.pl
> # Check for running the script
> perl that-script.pl
> # Check for running the script with CGI parameter foo set to bar
> perl that-script.pl foo=bar