An experimental study of the 9Be(p, π+)10Be and 9Be(p, π−)10C reactions at 185 MeV