Perform an action after Animator is finished

I’m using Animator to play different animations for my main character:

private Animator anim; 

anim.Play("Attack");

How can I play the full animation and then perform an action after the Attack animation is finished?

When the Coroutine is done, performAction()