in reply to Pull all text from msword document
a few random thoughts:
- add use strict; and use warnings;
- I assume the SaveAs() method has to take a filename and not a filehandle.. if it could take a filehandle IO::Scalar would help you out..
- If you do the equivalent of a "select all", what data type/structure do you get? can you get plain text from that?
- If you do a "select all" and "copy" to shove it into the clipboard, is it any easier to get the plain text from that? (this is probably not the ideal route)
- Using a temp file isn't the worst thing in the world.. File::Temp will make it easier, too.
|