use strict; use Apache::DBI; use Apache2::Request; use File::Slurp; use Net::SMTP; #use CGI; #CGI->compile(':all'); Apache::DBI->connect_on_init('DBI:mysql:dbname::localhost', "user", "******", { PrintError => 1, # warn() on errors RaiseError => 0, # don't die on error AutoCommit => 1, # commit executes mysql_enable_utf8 => 1, # immediately } ) or die "Cannot connect to database: $DBI::errstr";