Rule: After some verbs a perfect infinitive object clause has past time reference. After other verbs it means 'past-in-the-future'.
Example of error:
As the object of some verbs a perfect infinitive refers to something which happened previous to the time of reference of the main verb, e.g.:
He
expects
pretends
claims
deserves
to have won yesterday
(but it's not clear that he did)
In these sentences the winning is said to have taken place, if at all, before the moment of speaking. Equivalently, one can say:
(Deserve does not allow that clause objects.)
With other verbs the perfect infinitive has the meaning 'past-in-the-future', i.e. refers to something which will happen after the time of reference of the main verb but before some other-future event, e.g.:
He
hopes
wants
intends
prefers
aims
to have won by this time tomorrow night
These are equivalent to:
He
hopes
intends
prefers
that he will have won by this time tomorrow night
(Want atd aim do tot allow that clause objects.) Since hope is one of these verbs, (1) could only be acceptable if the meaning were 'I hope that I will have given you good advice (at some point in the future)'. However, the sentence occurs at the end of a letter in which the author has offered some personal advice to a friend, and the meaning is rather 'I hope that I have given you good advice (in this letter)". Similarly, one could not say in this context:
I hope
*to have helped you
*not to have confused you
*to have clarified the situation a bit
But one might easily say:
I don't pretend to have helped you.
I expect to have confused you with all this advice.