Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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?
Re: Best way to do a Word for Mac conversion to a text file format in Perl?
by MidLifeXis (Prior) 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 mhearse (Hermit) on Jan 18, 2013 at 19:47 UTC
    Here's the poor man's way:
    strings microsloft.doc | perl -e 'yourcode'
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'

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 musing on the Monastery: (11)
As of 2014-09-19 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (144 votes), past polls