Cosmological perturbations in generalized gravity theories: Solutions.