The perfect infinitive is most commonly found in type 3 conditional sentences as part of the conditional perfect, although it can be used in other places as well. The perfect infinitive is formed:
to have + past participle
As with the present infinitive, there are situations where the zero form of the perfect infinitive is required, so the word to is omitted. This happens after most modal auxiliaries, and in other places where zero infinitives are used.
- He pretended to have seen the film.
- Before I turn 40, I want to have written a book.
- I would like to have been to the Taj Mahal when I was in India.
- If I had known you were coming I would have baked a cake.
- Someone must have broken the window and climbed in.
- That man may have noticed the bank robbers' getaway car.