You might want to look at adding the following after your require statement:
use Win32::OLE::Const 'Microsoft Word';
And then, changing this line:
$doc->SaveAs( { FileName => $outfile, FileFormat => $wdFormatText});
To:
$word->WordBasic->FileSaveAs("$outfile", wdFormatText);
This will remove the extra characters in the text file. As far as re-saving the document and restoring the formatting, that is another question altogether. Have you read the documentation on OLE? There's helpful information at
Active State. Do a search there for all of ActiveSite on OLE as well. While there's not alot of easy to find info out there, doing a web search on "OLE" and "Perl" and "Word" will find some useful pieces for your puzzle. David Roth has a couple of excellent books out there for reference.
Also, have you tried resaving your converted file back into Word yet and has that worked? What's the end goal for this snippet?