Temperature controls the entrainment of Drosophila melanogaster locomotor activity to different seasonal conditions through the regulation of splicing of the intron within the 3' UTR of period (per) mRNA. This analysis of per 3' splicing and behaviour in different genetic backgrounds revealed that at low temperatures per splicing is regulated primarily by the light input received via the visual system. At higher temperatures, regulation is more stringent, requiring the visual system input during the day and the circadian clock at night. This is surprisingly as cryptochome is assumed to be a circadian photoreceptor, yet regulates splicing primarily as a clock component. Conversely, the visual component, no-receptor-potential-A, appears to have an additional circadian role, probably in thermosensitivity, as a mutation generated levels of 3' splicing that could not be explained by its effect on the visual pathway.;This work also resulted in the identification of a unique circadian phenotype. per01; cryb mutants display an evening activity peak anticipating 'lights off' in light: dark cycles, which should be clock dependent, yet are arrhythmic under constant conditions, signifying the absence of a clock. This anticipation is not seen in tim01; cryb mutants, so is probably the result of the light dependent degradation of TIMELESS (TIM). Therefore, as per01; cryb flies have residual clock function even in the absence of PER, there must be a PER-independent role for TIM.;Finally, the per gene determines species-specific locomotor behaviour. This is not down to differential per splicing as an examination of D. pseudoobscura and D. virilis failed to discover regulated per splicing in either species. Instead, species-specific differences in behaviour seem to be determined by altered patterns of per mRNA expression. Thus, light and temperature sensitive per splicing has evolved in D. melanogaster, allowing it to 'fine tune' behaviour to the wide variety of habitats it occupies.