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