... my $docPath = 'D:\Delme~~\test.docx'; print "Found file '$docPath'\n" if -f $docPath; my $document = Win32::OLE->GetObject($docPath) or die "GetObject failed: $!\n"; ...