Example 5 (2002 Australian National Mathematics Competition) Find all prime numbers $p, q, r$ such that $p^{q}+p^{r}$ is a perfect square.
Analyze the two cases of $q=r$ and $q \neq r$. When $q \neq r$, assume without loss of generality that $q<r$, and transform $p^{q}+p^{r}$ into $p^{q}\left(1+p^{s}\right)$. By the properties of perfect squares and $\left(p^{q}, 1+p^{s}\right)=1$, we get that $p^{q}$ and $1+p^{s}$ are both perfect squares, thus simplifying the problem.

Solution: If $q=r$, then $p^{q}+p^{r}=2 p^{q}$.
So $p=2$, and $q$ is an odd prime.
Thus, $(2, q, q)$ is a set of prime triples that satisfy the condition, where the prime $q \geqslant 3$.
If $q \neq r$, without loss of generality, assume $q<r$, then $p^{q}+p^{r}=p^{q}\left(1+p^{s}\right)$, where $s=r-q \geqslant 1$.
Since the greatest common divisor of $p^{q}$ and $1+p^{s}$ is 1,
both $p^{q}$ and $1+p^{s}$ must be perfect squares. Hence $q=2$.
Since $1+p^{s}$ is a perfect square,
let $1+p^{s}=u^{2}$, i.e., $p^{s}=u^{2}-1=(u+1)(u-1)$.
Since the greatest common divisor of $u+1$ and $u-1$ is 1 or 2,
when the greatest common divisor is 2, $u$ is odd, and $p$ is even, i.e., $p=2$, and both $u-1$ and $u+1$ are powers of 2, so $u$ is 3, thus $1+2^{s}=3^{2}$.
So $s=3, r=q+s=2+3=5$.
Thus, the prime triples that satisfy the condition are $(2,2,5)$ and $(2,5,2)$.
When the greatest common divisor of $u+1$ and $u-1$ is 1, $u$ is even, and $u-1$ must be 1, otherwise $u-1$ and $u+1$ can be expressed as the product of different odd primes, so it cannot be an integer power of a prime, thus
$u=2, p^{s}=(u-1)(u+1)=3, p=3, s=1, r=q+s=3$.
Thus, the prime triples that satisfy the condition are $(3,2,3)$ and $(3,3,2)$.
In summary, the solutions to the original problem are $(2,2,5),(2,5,2),(3,2,3),(3,3,2),(2, q, q)$, where the prime $q \geqslant 3$.