In this paper a new comprehensive analysis of parton-to-pion fragmentation
functions (FFs) is performed for the first time by including all experimental
data sets on single inclusive pion as well as unidentified light charged hadron
production in electron-positron ($e^+e^-$) annihilation. We determine the pion
FFs along with their uncertainties using the standard "Hessian" technique at
next-to-leading order (NLO) and next-to-next-to leading order (NNLO) in
perturabative QCD. It is shown that the determination of pion FFs using
simultaneously the data sets from pion and unidentified light charged hadron
productions leads to the reduction of all pion FFs uncertainties especially for
the case of strange quark and gluon FFs by significant factors. In this study,
we have quantified the constraints that these data sets could impose on the
extracted pion FFs. Our results also illustrate the significant improvement in
the precision of FFs fits achievable by inclusion of higher order corrections.
The improvements on both FFs uncertainties as well as fit quality have been
clearly discussed.