in reply to Perl and Microsoft Excel

Maybe you could get away with simply setting the content type specification to application/vnd.ms-excel in the HTTP headers.

Something like:

Content-Type: application/vnd.ms-excel; name='excel'
Content-Disposition: attachment; filename=foo.xls

Then send a csv data as the content. It's a hack, but it's simple.