in reply to DBI returning error on selectrow_hashref
my $dbh = DBI->connect(...) or die DBI::errstr;Or, the way I prefer:
my $dbh = DBI->connect($dsn,$usr,$pass,{RaiseError=>1});
Either of those ways will die with an appropriate warning if there is no $dbh object.
|
|---|