in reply to how to deal with error message
Instead of having it die, simply have it call a subroutine that sends you the email, then exit.
my $dbh = DBI->connect('DBI:Oracle:host=**,sid=***', 'usrname', 'passw +d', { RaiseError => 1, AutoCommit => 0 } ) or sendmail(); sub sendmail { ... #Send mail here die; }
Update: Or, instead of having the die command in your subroutine (which may be troublesome if you plan to call the subroutine more than once) you can use or sendmail() and die; rather than just sendmail();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to deal with error message
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 |