##
eval {
$dbh->do(...);
$dbh->do(...);
$dbh->do(...);
$dbh->do(...);
}
if($@) {
handle_error();
}
####
use Fatal qw(open);
eval {
$dbh->do(...);
open my $fd, "<", $file;
# some other stuff
}
if($@) {
# and here we can't say if it was DBI problem or open
}