use CGI (); # <<--update print CGI::header(-type => 'application/vnd.ms-excel');