in reply to no database driver specified and DBI_DSN env var not set

Use RaiseError and you won't need all those 'or die's on the DBI calls (and as an added bonus you will catch any errors that occur during the fetch):
my $dbh = DBI->connect( "dbi:mysql:$db:$host", "$db_user", "$db_password", { RaiseError => 1 } );