C/C++ is a great language for writing the Perl compiler/interpreter. In fact, it's the language that
is used. (C/C++ was even used to write
itself, but that's another story...)
It's also a good language for writing certain low-level portions of some of the many CPAN modules.
"Aye, here's the rub..." The
low-level portions, not
all of them. The parts that need to run very fast. In the proverbial "80/20 rule," C/C++ is used for "the crucial 20% of the code that is running 80% of the time." The messy inner workings of "a hash," for example. Memory management and garbage-collection. Or references. The rocket-science stuff... but
only the rocket-science stuff.
For "all the rest of it," you simply write it in Perl,
knowing that by so doing you are happily taking advantage of a very large amount of well-tested C/C++ code that you call "Perl, itself." In a single line of Perl code you can do many complicated things that would ... and in fact, that
did ... take "pages and pages of clever and tricky C/C++ code" to specify. That clever, tricky code is part of Perl itself, and so you can take full advantage of someone else's cleverness while completely ignoring it.
Referring once again to the "80/20 rule," nearly all of the code in a typical application is boring ... uninteresting ... and, time-wise, rarely used. The time that needs to be saved is
your time, not the computer's. (
"At 10 billion ops per second, no one can hear you scream.") What you need, then, is a very well-written power tool that allows you to be
expressive ... and that's what Perl is. Perl is a
lever.
What makes Perl particularly useful and impressive is... the CPAN library. Your work becomes vastly more efficient when you can leverage
someone else's complete, well-tested
package to do some task... which Perl allows you to do particularly easily.
This analogy can of course be extended to any of the other myriad scripting-languages that Unix/Linux supports: PHP, Python, Ruby, Scheme, various Visual Basic knock-offs,
etc. etc. (They, too, have their analog to CPAN.)