Hi , i'm new to perl and its been couple of days since i ve stepped into this world of PERL. I'm actually trying to write a script which can open a MS word document, search for the particular pattern ,say a particular command "chown and chmod" and note the following details. 1) Number of occurences of a pattern , full line of string containing the pattern into a different file. 2) Also , copy down the previous two lines and succeeding two lines after the occurencde of pattern. I see, WIN32::OLE is the way to do this. But i am unable to find any resource which could explain WIN32::OLE in terms of WORD and how we can manipulate the read data. say by printing it another doc or printing it to STDOUT. Though there are are couple of notes about WIN32 OLE , they are mainly with respect to Excel and also not so descriptive for a beginner. It would be helpful if someone can point me in right direction or give a code with description , it would be really helpful.

In reply to WIN32 and MS Word ! by EPeddler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.