in reply to Win32::OLE not opening a window for me
"the message, "Main::$doc only used once" which may be something."
Yes, it indeed is "something."
It is telling you that you have used the variable $doc only once (in scope) in your script.
Perhaps you've drawn an incorrect conclusion about visibility (which I infer from your title): $doc is visible to perl in (some part of) the script; if you want "eyeballs on" the contents of $doc, you'll need to send it to your console (screen), and, if you want an accurate display, decode from Word's character set to the once used by your console. (see davies's Re: Win32::OLE not opening a window for me above)....
( ... and, of course, that presumes that you've provided an accurate path and filename in $document_path. More detail on the script may be needed to ascertain that, if there's another problem.)
Update: ... 'oops!', says /me. I now think I misunderstood/misread part of your problem. The message you quote is, indeed, telling you what I said in the first two para after the quote, but John Davies' understanding of what you were talking about re "visible" seems likely to be far closer to be an answer to your visibility issue than that in the portion marked by strikethrus above.
Update 2: PS: if you're using strict (highly recommended because it can help find one's errors), then you should have received another message... something to the general effect that " ... $doc requires requires explicit package name at line nnn." The more we know about things like error messages and warnings, the better the help we provide (as long as we don't misread the problem :-( ).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Win32::OLE not opening a window for me
by Anonymous Monk on Mar 23, 2012 at 14:03 UTC | |
by ww (Archbishop) on Mar 23, 2012 at 14:27 UTC | |
by Anonymous Monk on Mar 25, 2012 at 00:32 UTC | |
by ww (Archbishop) on Mar 25, 2012 at 01:56 UTC |