use Win32::OLE; $wd = Win32::OLE->GetObject("mydll") || die "Unable to load Win32::OLE" . Win32::OLE->LastError;