my ($the_name) = $dbh->selectrow_array( "SELECT the_name FROM the_table WHERE id=3"); #### $sth = $db->prepare("SELECT the_name FROM the_table WHERE id=?"); $sth->execute(3); my ($the_name) = $sth->fetchrow_array;