Currently, most of the numerical simulations of structure formation use Newtonian gravity. When modelling pressureless dark matter, or `dust, this approach gives the correct results for scales much smaller than the cosmological horizon, but for scenarios in which the fluid has pressure this is no longer the case. In this article, we present the correspondence of perturbations in Newtonian and cosmological perturbation theory, showing exact mathematical equivalence for pressureless matter, and giving the relativistic corrections for matter with pressure. As an example, we study the case of scalar field dark matter which features non-zero pressure perturbations. We discuss some problems which may arise when evolving the perturbations in this model with Newtonian numerical simulations and with CMB Boltzmann codes.