Pion structure function from low-p T hadron production