The differential cross section for production of charged hadrons with high transverse momenta in scattering of 160,GeV/$c$ muons off nucleons at low photon virtualities has been measured at the COMPASS experiment at CERN. The results, which cover transverse momenta from 1.1,GeV/$c$ to 3.6,GeV/$c$, are compared to a perturbative Quantum Chromodynamics (pQCD) calculation, in order to evaluate the applicability of pQCD to this process in the kinematic domain of the experiment. The shape of the calculated differential cross section as a function of transverse momentum is found to be in good agreement with the experimental data, but the absolute scale is underestimated by next-to-leading order (NLO) pQCD. The inclusion of all-order resummation of large logarithmic threshold corrections reduces the discrepancy from a factor of three to four to a factor of two. The dependence of the cross section on the pseudo-rapidity and on virtual photon energy fraction is investigated. Finally the dependence on the charge of the hadrons is discussed.