eval { my $dbh = DBI->connect( " yada yada " ), { PrintError => 0}, or die "cannot open db connection: $DBI::errstr\n"; } return $dbh;