use strict; use GTop (); use DBI (); my $dbh = DBI->connect("DBI:mysql:test::localhost", "", "", { PrintError => 1, # warn() on errors RaiseError => 0, # don't die on error AutoCommit => 1, # commit executes immediately } ) or die "Cannot connect to database: $DBI::errstr"; my $r = shift; $r->send_http_header('text/plain');