Suppose $h$ is a periodic function and has limit $l\in\mathbb{R}$ at $+\infty$. Show that $h$ is a constant. Here is what I think.
Since $h(x)$ is a periodic function then $T\in\mathbb{R}^*$ such that $h(x+T)=h(x)$
And by the definition of limit $\lim_{x\to +\infty}h(x)=l$
$\forall \epsilon>0, \exists x_0, \forall x>x_0 $ $$|h(x)-l|<\epsilon$$
Suppose on the contrary that $h$ is not constant. Since $h$ is periodic, let $T\gt 0$ be its period. It follows that there exist $x_1,x_2\in \mathbb R \cap [0,T]$ such that $h(x_1)\ne h(x_2)$.
Consider two sequences $y_n=x_1+nT$ and $y_n'=x_2+ nT$ for $n\in \mathbb N$ and it is plain that $\lim_{n\to \infty}h(y_n)=h(x_1)$ and $\lim_{n\to \infty}h(y_n')=h(x_2)\ne h(x_1)$, whence it follows that $\lim_{x\to \infty} h(x)$ can't exist if $h$ is non-constant.
Therefore for periodic $h$, $\lim_{x\to \infty} h(x)$ exists if and only if $h(x)$ is a constant function.