in reply to CGI script makes Internal Server-error

Since you've stated that you're fairly new to Perl, allow me to make some additional suggestions:

Hope you find that helpful.

Those who know that they are profound strive for clarity. Those who
would like to seem profound to the crowd strive for obscurity.
            --Friedrich Nietzsche