Homeotic and sex-determining genes control a wide range of morphological traits by regulating the expression of different target genes in different tissues. The identity of most of these target genes remains unknown, and it is not even clear what fraction of the genome is regulated in a segment- and sex-specific manner. In this report, we examine segment- and sex-specific gene expression in Drosophila pupal legs. The first and second legs in Drosophila have clearly distinguishable bristle patterns. Bristle pattern in the first leg also differs between males and females, whereas the second leg has no overt sexual dimorphism. To identify the genes responsible for these differences, we compared transcriptional profiles between male and female first and second legs during early pupal development. The extent of sexually dimorphic gene expression parallels morphological differences: over 100 genes are expressed sex specifically in the first leg, whereas no sexual differences are seen in the second leg. Segmental differences are less extensive than sexual dimorphism and involve fewer than 14 genes. We have identified a novel gene, CG13857, that is expressed exclusively in the first leg in a pattern that suggests this gene may play an important role in specifying segment- and sex-specific bristle patterns.