The docs are your friend ... http://www.perl.com/doc/manual/html/pod/perlfunc/die.html
As for the funky "DBI::st=HASH ...", try 'die "message: ", $sth->errstr;' or 'die "message: $DBI::errstr"; -- Ron Reidy Lead DBA Array BioPharma, Inc. -----Original Message----- From: Jain, Abhay K, ALABS [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 12:47 PM To: dbi-users@perl.org Subject: Error variable value after execute The following statement (trying to insert a duplicate row) $sth->execute() or die "could not execute insert: $sth->errstr\n"; returns a value of DBI::st=HASH(0x14065d780)->errstr for $sth->errstr. Is that normal. Moreover prints a long error message on screen (STDERR). How do I capture that? Abhay This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.