They have a close relationship, but they are both alphas with a very good understanding about business in general and how the soccer universe works when it comes to playing your best poker to get the best possible contract. Perez knows the value of Zidane, Zidane knows Perez' value for him and they each know their own value.
Zidane had such an amazing run at the beginning of his career as a coach that afterwards he could more or less dictate what has to be written down in his contract.
But I also think that Zidane is always a good option for Real Madrid and he isn't that old. He also isn't interested in extreme long-term contracts like Potter has with Chelsea (5 years) as Zidane knows it could be over after one or two years anyway and it wouldn't even be against his own interests. He doesn't come across as a coach who wants to stay with a club for a decade. That's why Real Madrid is the perfect address.
But I would like to see Zidane as a coach again as soon as possible, but hopefully for a club other than Real Madrid. Would be cool to see how he will do in another league like the Premier League.
As the most respected figures in Bernabéu and parts of the club history, Zidane and Perez respect each other. But when Zidane took part as the team coach, there were always some tense discussion between them in every transfer window, and when the team lost their way to win a cup, because of obvious reason, Perez always demands one major trophy per season on the coach. Now it's a hot seat for Ancelotti since their way to LaLiga becomes tougher and the 1st leg of Copa del Rey didn't go well. If Real Madrid got beaten by Liverpool in their 1st leg of UCL, it would be so close for Perez to fire Ancelotti right after their 0-1 lost against Barca. For now his spot is still safe, and it'll be determined later after the 2nd leg games of UCL and CdR.
...
The question about who will be coaching real madrid for next season has not been answered yet.
As a Madrid fan, this is always an interesting topic as I have been following this team since I was a little kid. Except Mourinho and Ancelotti, Real Madrid, especially Perez, always getting a coach from non-European-big teams e.g. Lopetegui, Solari, Pellegrini, Schuster, Lopez Caro, and Luxemburgo. In case Ancelotti leaves Real Madrid and Zidane doesn't feel it's the right time for him to come back, I'm really curious on who the next manager.