  Cosmology in extended theories of gravity is considered assuming the Palatini
variational principle, for which the metric and connection are independent
variables. The field equations are derived to linear order in perturbations
about the homogeneous and isotropic but possibly spatially curved background.
The results are presented in a unified form applicable to a broad class of
gravity theories allowing arbitrary scalar-tensor couplings and nonlinear
dependence on the Ricci scalar in the gravitational action. The gauge-ready
formalism exploited here makes it possible to obtain the equations immediately
in any of the commonly used gauges. Of the three type of perturbations, the
main attention is on the scalar modes responsible for the cosmic large-scale
structure. Evolution equations are derived for perturbations in a late universe
filled with cold dark matter and accelerated by curvature corrections. Such
corrections are found to induce effective pressure gradients which are
problematical in the formation of large-scale structure. This is demonstrated
by analytic solutions in a particular case. A physical equivalence between
scalar-tensor theories in metric and in Palatini formalisms is pointed out.
