  We describe the space of measured foliations induced on a compact Riemann
surface by meromorphic quadratic differentials. We prove that any such
foliation is realized by a unique such differential $q$ if we prescribe, in
addition, the principal parts of $\sqrt q$ at the poles. This generalizes a
theorem of Hubbard and Masur for holomorphic quadratic differentials. The proof
analyzes infinite-energy harmonic maps from the Riemann surface to
$\mathbb{R}$-trees of infinite co-diameter, with prescribed behavior at the
poles.
