ter-lhe

to have … to/for him or her

→ ter
phrase Rare #24,914
to have … to/for him or her “Lhe” is an indirect object pronoun and can also refer to someone addressed formally as “you”. It attaches to the infinitive “ter”; the word after it is usually a past participle.
PO: Devo ter-lhe enviado a mensagem.
EN: I must have sent her the message.

Deveríamos ter-lhe contado a verdade.

We should have told him the truth.

Mas temo ter-lhe perdido o hábito e o gosto.

But I'm afraid I've lost the habit and the taste for it.

— Mistérios de Lisboa (2010)

As coisas podiam ter-lhe corrido muito mal.

Things could have gone very badly for him.

Eu devo ter-lhe contado isso.

I must have told him that.

— PK (2014)

Já devem ter-lhe contado.

They must have already told you.

— O Fabuloso Destino de Amélie (2001)

Francamente, eu preferiria ter-lhe sido útil com algum conselho.

Frankly, I would have preferred to have been helpful with some advice.

— Fellini 8½ (1963)

Sinto muito mesmo por ter-lhe dito aquilo.

I’m really sorry for saying that to you.