in reply to creating an error message

The "internal software error" probably means your perl program threw an error, the text of which ended up in the server's error log. If you have no access to the error log (for any reasonable development environment, you really should) see CGI::Carp.