Using undef will merely move the error from the end of the output to the middle of the output. The DESTROY method will be called at some time, and the only solution is to ensure that the object is valid when it is called.
A small addition: if the corruption is occurring due to the undefined order in which global destruction is carried out, releasing the last reference prior to global destruction will resolve the problem. But you do not know that that is the case — there could be a bug in the questioner's program that is corrupting the object or global destruction may be trashing it before destroying Win32::OLE::Lite. You. Do. Not. Know. Which. Is. Happening. Here.
In reply to Re^3: Lite.pm Causing Problems
by jcb
in thread Lite.pm Causing Problems
by jolasa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |