in reply to How do I get better at thinking about optimizing my Perl?

Start by running your code using perl -d:DProf, then run dprofpp. This will tell you where you're spending most of your time.

There is a ton of stuff out there on profiling perl.