Note: the "Perl and DB" slides (set 4) has an error on page 5, the second slide entitled "Example -- Get from DB, output TEXT". The error does not matter much for producing text, but could cause problems when having Perl generate XML. Corection -- to have Perl generate a text file (such as CSV format), you should *not* have: print header("Content-Type: text/plain; charset=UTF-8"); instead use this: print "Content-Type: text/plain; charset=UTF-8\n\n"; (the \n\n is necessary to insert a blank line after the header). If you want to produce XML, change text/plain to text/xml. Here is a complete Perl file that generates simple XML. use CGI qw( :standard ); use DBI; use DBD::mysql; use strict; print "Content-type: text/xml; charset=UTF-8\n\n"; print "\n"; print " Joe "; print " Mid "; print "\n";