You're not checking the return code from connect().
{RaiseError=>1} takes care of that.
In reply to Re^2: Having issues with DBI by Narveson in thread Having issues with DBI by zoophagous