in reply to Graceful handling of DBI connect errors'

You could try somethig like
my $dbh = DBI->connect('dbi:Oracle:', qq{$bu_username/$bu_passwd@DESCRIPTION= (ADDRESS=(PROTOCOL=TCP) (HOST= $bu_host)(PORT$bu_port)) (CONNECT_DATA=(SID=$bu_sid)))}, "", {RaiseError=>1});
RaiseError is used in conjunction with eval {...} to catch the exception that is being thrown

perldoc DBI at the command prompt and a search for RaiseError
will get a fuller explanation
Hope this helps