http://qs321.pair.com?node_id=670663


in reply to How to suppress print connection error to stderr

The problem is that you specify the database name in the connect() call. DBD::Sybase attempts to "use" the database, and when that fails it reports the error. This is done early in the processing, and DBD::Sybase doesn't correctly handle the PrintError/RaiseError flags at that point (because they get set later in the process).

Suggestion: don't specify the database in the DBI->connect() call, and instead run a $dbh->do("use DBNAME") right after the connect. This will properly handle the PrintError/RaiseError settings.

Michael