in reply to Selective Optimization

  1. Find out where it's slow -- search for 'profiling'
  2. Find out why it's slow -- post snippet or search for idiomatic perl
  3. Compare alternatives -- Benchmark is your friend
  4. ???
  5. Profit

(I just had to throw those last two in there!)

-derby