Example 1. Let $a$ be a digit from 1 to 9. Discuss the number of perfect squares in the sequence $a, \overline{a a}, \bar{a} \overline{a a}, \overline{a a a a}, \cdots$.
Analysis: For $a$ equal to $2,3,7,8$, $a$ equal to $1,5,9$, and $a$ equal to $4,6$, respectively. It is not difficult to see that only $1,4,9$ are perfect squares.