# Prepare the SQL query eval { $sth = $dbh->prepare($$sql); }; if ($@) { confess("ERROR:$0: Error in SQL prepare \n $@ "); } # Execute the SQL Query eval { $sth->execute(); }; if ($@) { $dbh->rollback(); confess("ERROR:$0: Error in SQL execute \n $@ "); }