$sth = $dbh->prepare( "select blah from table" ) or die "Prepare failed: ", $dbh->errstr;