If firefox is asking you if you want to save the file, that likely means your web server is spitting out the text of the Perl code instead of executing the Perl code.
Do other CGI applications work on this server/machine?
My suspicion is that you don't have Apache configured correctly to run the CGI application. See the Apache docs on how to do that.
And, as mentioned above, you'll need to make sure you put the Perl code in a directory that is listed in your Apache config as a Script or ScriptAlias location.
And, make sure you have the appropriate permissions set on the Perl code. If the execute bit is not set, it won't execute.
In short, see the Apache docs on enabling/installing CGI applications.
'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.