A new characterization of Hamiltonian cycles in $P_m\times P_n$, given in this paper, makes it possible to determine a special digraph for each number $m$. In this way, the enumeration of Hamiltonian cycles in $P_m\times P_n$ amounts to the enumeration of all oriented walks of the length $(n-2)$ in the digraph with the initial and final vertices in given sets. A recurrence relation for the number of Hamiltonian cycles in $P_6\times P_n$ is derived as well.