Bebo has asked for the wisdom of the Perl Monks concerning the following question:

To make things simple, here is my error and code:

Win32::OLE(0.1403) error 0x80010106: "Cannot change thread mode after it is set" at myFile.pl line 273 eval {...} called at myFile.pl line 273
use Win32::OLE::Variant; use Win32::OLE qw( EVENTS in with valof ); Win32::OLE->Option( Warn => 3); my $ie = Win32::OLE->new('InternetExplorer.Application'); Win32::OLE->WithEvents($ie, \&cleanExit, 'DWebBrowserEvents2');
I'm positive that the error has something to do with the "WithEvents" line, because adding it causes the script to break. However, this is exactly how all the examples I've seen have done it. Comments would be greatly appreciated!