I forgot to mention another source that gives as exercise to prove that {a^n| with n a square} is not recognizable as a language by a pushdown automaton.
You might be right about Perl regexes being more powerful. I honestly don't know so I'll call it a day.
Comment on Re^2: check for square-number with a regex