use strict; use warnings; use MSWord::ToHTML; my $converter = MSWord::ToHTML->new; my $doc = $converter->validate_file("/home/myself/my_excellent_writing.doc"); # This returns an instance of MSWord::ToHTML::Doc my $docx = $converter->validate_file("/home/myself/my_excellent_notes.docx"); # This returns an instance of MSWord::ToHTML::DocX my $writing_html = $doc->get_html; # This returns an instance of MSWord::ToHTML::HTML my $notes_html = $docx->get_html; # This returns an instance of MSWord::ToHTML::HTML my $text = $notes_html->content; # The text content of the file. my $text = $writing_html->content; # The text content of the file.