For 2^(p-1)(2^p-1) to be a perfect number we need both p and 2^p-1 to be prime. Since it is not known if there are infinitely many primes of the form 2^p-1 (Mersenne primes) the fact that there are infinitely many primes does not imply that there are infinitely many perfect numbers.

For 2^(p-1)(2^p-1) to be a perfect number we need both p and 2^p-1 to be prime. Since it is not known if there are infinitely many primes of the form 2^p-1 (Mersenne primes) the fact that there are infinitely many primes does not imply that there are infinitely many perfect numbers.