$dbh = Call our algorithm that connects us to the DB. if (!$dbh) { print "Cannot connect to database: $DBI::errstr\n"; } $sth = $dbh->prepare(q{desc userinfo}); $sth->execute(); $dbh->disconnect; exit(1);