Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Best way to do a Word for Mac conversion to a text file format in Perl?

by axiomcrs (Initiate)
on Jan 18, 2013 at 18:45 UTC ( #1014108=perlquestion: print w/ replies, xml ) Need Help??
axiomcrs has asked for the wisdom of the Perl Monks concerning the following question:

I would like to convert some Word for Mac files into text files from perl. That will make them more suited to the parsing with regexes I would like to do. I have written a similar script in Windows, but now it must done on the Mac, i.e. 10.6.8. Word for Mac is version 2008. Thank you.

Comment on Best way to do a Word for Mac conversion to a text file format in Perl?
Replies are listed 'Best First'.
Re: Best way to do a Word for Mac conversion to a text file format in Perl?
by MidLifeXis (Monsignor) on Jan 18, 2013 at 19:05 UTC
Re: Best way to do a Word for Mac conversion to a text file format in Perl?
by tobyink (Abbot) on Jan 18, 2013 at 21:16 UTC

    I've had good results from Text::Extract::Word - can't say whether it specifically deals with files from that particular version of Word though.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re: Best way to do a Word for Mac conversion to a text file format in Perl?
by mhearse (Hermit) on Jan 18, 2013 at 19:47 UTC
    Here's the poor man's way:
    strings microsloft.doc | perl -e 'yourcode'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1014108]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2015-07-28 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls