Bat file to delete blank spaces right side each line in txt file

Closed
Report
Posts
1
Registration date
Wednesday October 3, 2012
Status
Member
Last seen
October 3, 2012
-
Hello,

i have a text file which comes as in put feed file there are lot balnk spaces at the end of each line in them can anyone help me in cretaing a bat or perl script to delete them . it 's very urgent . Thanks guys