Its probably a matter of adding the proper handlers for the file type in 
your httpd.conf file (assuming the modules are loaded already).

If you are seeing it parsed as a text file, the server just doesn't 
realize that it needs to send files with this extension into the module 
- so it guesses at the mime type, and treats it as a text file.

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#

#AddHandler cgi-script .cgi

I'm not sure on the specifics.  I've done it for php a number of times, 
but not perl.  It probably depends on how the perl module is put together.

For php, I have to do the following:

LoadModule php5_module        modules/libphp5.so

AddType application/x-httpd-php .php






-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/