in reply to Re: Re: DBI error and $@
in thread DBI error and $@
I believe you have misunderstood the advice: you combine the approaches, you don't replace one with the other.
You have to set $@ yourself by calling die in the normal way:
eval { $db->do($sql) or die $db->errstr(); $db->commit(); } if ($@) { warn "DB error: $@\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: DBI error and $@
by Fastolfe (Vicar) on Dec 07, 2001 at 00:24 UTC |