in reply to DBI, rows, and do

The line(s)
$dbh = DBI->connect(...) || die "DB connect failed: " . $dbh->errstr;
won't print anything useful upon failing to create $dbh, since you can't in this case call a method on an object whose construction failed. You probably want something more like:
$dbh = DBI->connect(...) || die "DB connect failed: ", DBI->errstr;
Update: jZed++!

Replies are listed 'Best First'.
Re^2: DBI, rows, and do
by jZed (Prior) on Jun 06, 2005 at 02:11 UTC
    You're right in general, but in this case yours wouldn't do anything either :-). Since the OP included RaiseError=>1 in the connect statement, the connect, if it fails, will print the errstr and die before it reaches the or part of the statement.