I would correct a little bit on your rule of thumb: before coding in Perl, search CPAN for solutions that you can integrate. More often than not IME there will be a nice, optimized, XSed module that does the slow. YMMV, of course :-)
That is simply part of "Code it in Perl" is it not? In like fashion one might long ago have said "Code it in FORTRAN" then optimise in assembly language, or "Code it in C" (which is almost assembly language anyway). (I've written in machine code, assembly language, FORTRAN and C, among other languages btw.)