In a Database 

my($town) = $db->selectrow_array(
    'SELECT name FROM town_city WHERE id = ?', {}, $id);