2007fld has asked for the wisdom of the Perl Monks concerning the following question:
What I want is, when the database connection is NOT set up, the script should email me to let me know. But since the die command is there to terminate the program right after the unsuccessful connection, how do I add the command, like 'sendmail'?my $dbh = DBI->connect('DBI:Oracle:host=**,sid=***', 'usrname', 'passwd', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made:$DBI::errstr";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to deal with error message
by Lawliet (Curate) on Jul 22, 2008 at 19:51 UTC | |
by AltBlue (Chaplain) on Jul 22, 2008 at 20:26 UTC | |
by Lawliet (Curate) on Jul 22, 2008 at 20:35 UTC | |
by Bloodnok (Vicar) on Jul 23, 2008 at 09:56 UTC | |
|
Re: how to deal with error message
by moritz (Cardinal) on Jul 22, 2008 at 19:52 UTC | |
|
Re: how to deal with error message
by leocharre (Priest) on Jul 23, 2008 at 02:48 UTC |