In general, error checking on open -- open ($FH "<", $filename) or die "Can't open $filename, $!";Note1
for one possible example -- and using strict
are almost certain to be very helpful when you're experimenting in the way you describe..
I don't use Win32::OLE in the manner you are (and in fact, rarely in any fashion), so I have to ask: Are you sure the message to the console came from Word? I suspect it more likely came from Win32::OLE (or, less likely) from Perl itself).
Update: Note1 In a msg, davies points out (++) that the open illustrated in para 1 is a generalized form may be confusing in context. I agree, and should have phrased it to make clear that it is probably not applicable to file opens performed by/with Win32::OLE or the like.