in reply to Perl/SQL Query

An example in Perl In a Nutshell reads:
$st_handle->execute("1-56592-286-7", "Perl in a Nutshell") || die $db_handle->errstr;

It looks like errstr is what you're looking for.