Bouncing cosmologies, suggested by string/M-theory, may provide an alternative to standard inflation for accounting for the origin of inhomogeneities in our universe. The fundamental question is as regards the correct way to evolve the scalar perturbations through the bounce. In this work, we determine the evolution of perturbations and the final spectrum for an arbitrary ( spatially. at) bouncing cosmology, the only assumption being that the bounce is governed by a single physical scale. In particular, we find that the spectrum of the pre-bounce growing mode of the Bardeen potential ( which is scale invariant in some limit, and thus compatible with observations) survives unaltered in the post-bounce only if the comoving pressure perturbation is directly proportional to the Bardeen potential rather than its Laplacian, as for any known form of ordinary matter. If some new physics acting at the bounce justifies such a relation, then we are entitled to consider bouncing cosmologies as a real viable alternative for the generation of the observed inhomogeneities. Our treatment also includes some class of models with extra dimensions, whereas we show that bounces induced by positive spatial curvature are structurally different from all bounces in spatially. at universes, requiring a distinct analysis.