I can think of an example where this wouldn't hold.
Take 1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1.
But I can also prove that the statement holds.
Claim: $|f|$ is periodic then $f$ is periodic
Proof:
$|f(x+p)|=|f(x)|$
$f(x+p)=\pm f(x)$ if $f(x+p)=+f(x)$ then we are done, if $f(x+p)=-f(x)$ we get:
$f(x+2p)=-f(x+p)=f(x)$, so the period is twice bigger, but It still holds that $f$ is periodic.
Where is my mistake?