  The production of neutrons carrying at least 20% of the proton beam energy
($\xl > 0.2$) in $e^+p$ collisions has been studied with the ZEUS detector at
HERA for a wide range of $Q^2$, the photon virtuality, from photoproduction to
deep inelastic scattering. The neutron-tagged cross section, $e p\to e' X n$,
is measured relative to the inclusive cross section, $e p\to e' X$, thereby
reducing the systematic uncertainties. For $\xl >$ 0.3, the rate of neutrons in
photoproduction is about half of that measured in hadroproduction, which
constitutes a clear breaking of factorisation. There is about a 20% rise in the
neutron rate between photoproduction and deep inelastic scattering, which may
be attributed to absorptive rescattering in the $\gamma p$ system. For $0.64 <
\xl < 0.82$, the rate of neutrons is almost independent of the Bjorken scaling
variable $x$ and $Q^2$. However, at lower and higher $\xl$ values, there is a
clear but weak dependence on these variables, thus demonstrating the breaking
of limiting fragmentation. The neutron-tagged structure function,
${{F}^{\rm\tiny LN(3)}_2}(x,Q^2,\xl)$, rises at low values of $x$ in a way
similar to that of the inclusive \ff of the proton. The total $\gamma \pi$
cross section and the structure function of the pion, $F^{\pi}_2(x_\pi,Q^2)$
where $x_\pi = x/(1-\xl)$, have been determined using a one-pion-exchange
model, up to uncertainties in the normalisation due to the poorly understood
pion flux. At fixed $Q^2$, $F^{\pi}_2$ has approximately the same $x$
dependence as $F_2$ of the proton.
