in reply to Code Efficiency: Trial and Error?

Three rules govern the way I write my code:
  1. Pick the best / most appropriate algorithm
  2. Come up with an natural representation using Perl's data types
  3. Write code that's as clear and self-explanatory as possible

Note that "clear and self-explanatory" doesn't mean "clear and self-explanatory to someone who's never seen Perl before".

I make use of common "magic" features like $_ (which is only the simplest example) extensively. I use next / last to avoid indentations. I use statement modifiers a ton. I use the ternary operator quite frequently.

But not to shave a couple of characters off: to shave a couple of red tape tokens off, and thus baring the real goings-on to the eye. All my indentation and other style rules follow this maxime. I try to lay out my code such that I can absorb the structure while scrolling without even really reading.

Makeshifts last the longest.