  We study the behaviour of inflationary density perturbations in the vicinity
of horizon crossing, using numerical evolution of the relevant mode equations.
We explore two specific scenarios. In one, inflation is temporarily ended
because a portion of the potential is too steep to support inflation. We find
that perturbations on super-horizon scales can be modified, usually leading to
a large amplification, because of entropy perturbations in the scalar field.
This leads to a broad feature in the power spectrum, and the slow-roll and
Stewart--Lyth approximations, which assume the perturbations reach an
asymptotic regime well outside the horizon, can fail by many orders of
magnitude in this regime. In the second scenario we consider perturbations
generated right at the end of inflation, which re-enter shortly after inflation
ends --- such perturbations can be relevant for primordial black hole
formation.
