use Win32::OLE; $EAapp = Win32::OLE->new('EA.Repository', \&OleQuit) or die "oops\n";