Hello,
I have a perl script that inserts rows of data into a table.
I wish to trap any errors on this insert and e-mail them to an address. I
wish to use the standard mail tool that comes with UNIX.
eg echo $trapped_error | mail [EMAIL PROTECTED]
A snippit of my script is below.
Can anybody help?
Thanks,
Brett Hales
----------------
#Insert virus data
my $sql = qq{insert into table_name values ('@name','@dept','@emp)};
my $sth = $dbh->prepare($sql);
$sth->execute();
# *** Think I should trap errors here ***
$sth->finish;
$dbh->commit;
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]