### connect to database on every entry to program use DBI; $driver = "mysql"; # Set somewhere else, just including it here $drh = DBI->install_driver( $driver ); $dbh = $drh->connect( $workspace,$userid,$password ); $rv = $drh->err; $str = $drh->errstr; if ($drh->err != 0) { $errormsg="Cannot connect to database"; &printerr; }