Let $f: X \to Y$ be a finite surjective morphism of nonsingular varieties over a field $k$. Exercise III 9.3. in Hartshorne's Algebraic Geometry sais that if $k$ is algebraically closed, then $f$ is flat.
Is this still true, if $k$ is no longer algebraically closed, but still a perfect field?
In particular, I am interested in the case where $k=\mathbb{R}$.