In cosmology an important role is played by homogeneous and isotropic solutions of the Einstein-Euler equations and linearized perturbations of these. This paper proves results on the asymptotic behaviour of scalar perturbations both in the approach to the initial singularity of the background model and at late times. The main equation of interest is a linear hyperbolic equation whose coefficients depend only on time. Expansions for the solutions are obtained in both asymptotic regimes. In both cases it is shown how general solutions with a linear equation of state can be parametrized by certain functions which are coefficients in the asymptotic expansion. For some nonlinear equations of state it is found that the late-time asymptotic behaviour is qualitatively different from that in the linear case.