How do you know what your Perl programs are spending their time doing? How do you know where to start optimizing slow code? The answer to both these questions is "profiling," and Simon Cozens looks at how it's done.