I have read in http://www.grammaring.com/the-forms-of-the-gerund about perfect gerunds. There are two kind of usage in the website,one about "being" and other about "having". The website describes about them as follows:
The perfect gerund refers to a time before that of the verb in the main clause . However, it is only used if the time of the action expressed by the gerund is not obvious from the context: He denied being married. (the simple gerund being refers to the same time as denied: He denied that he was married.)
He denied having been married. (the perfect gerund having been refers to a time before denied: He denied that he had been married.)
My question: What's the difference in the meaning between these two sentences? I don't quite understand the definition of this website.