LastError Win32::OLE->LastError() This class method returns the last OLE error. In a numeric context, the error number is returned, while in a string context, the error message is returned.