"Ho, Tony" wrote:
> 
> I need to detect whether or not the connection was successful.
> 
> if (!$dbh) {
> 
> OR
> 
> if (!defined($dbh)) {
>
On success $dbh contains a database handle reference (which evaluates to
true).  On failure $dbh is undef (which evaluates to false).  Both tests
work but I prefer the latter.

--
  Simon Oliver

Reply via email to