in reply to Re^4: To Read and Edit docx files in Windows 7
in thread To Read and Edit docx files in Windows 7

Hmm, so strict is complaining, what do, what do ... satisfy strict somehow ... what does strict say about that ... strict vars says
This generates a compile-time error if you access a variable that was neither explicitly declared (using any of my, our, state, or use vars) nor fully qualified. (Because this is to avoid variable suicide problems and subtle dynamic scoping issues, a merely local variable isn't good enough.) See "my" in perlfunc, "our" in perlfunc, "state" in perlfunc, "local" in perlfunc, and vars.

So I think my @files = ...;

Maybe :/

  • Comment on Re^5: To Read and Edit docx files in Windows 7

Replies are listed 'Best First'.
Re^6: To Read and Edit docx files in Windows 7
by DVCHAL (Novice) on Dec 16, 2014 at 10:54 UTC
    my @files = resolves the error. Thanks for the Hint.

    Now I am with another Problem, when I open the word document named myfile.docx, another instance of "myfile" is getting opened in the name "~myfile.docx", Since i am parsing through all docx files(*.docx) in the working folder, The Win::OLE try to open this duplicate instance(~myfile.docx) also. But I am closing my opened Docs using $document->Close(), But that doesn't solve the issue. Any suggestion what goes wrong here?

      This is a temporary file created (and usually later deleted) by Word.

      Generally, you should exclude temporary files from processing. For Word, that's names beginning with ~ (except if your users really name their files like that :-/ ), and also files with zero size, which some versions of word seem to use as a lock indicator.