in reply to Returning a CSV file from CGI

Yes, you can alter the MIME type of the displayed page by calling $q->header('application/unknown');