(e-mail address removed) (Scott) wrote:
: My company is running a perl golf contest
Can your company afford to float a period of zero-productivity?
I had to give up competitive Perl golf. It was a deadly addiction.
: and I am looking for some
: tricks hints and techniques that I could use to help with my code. Do
: you guys know any good websites, or news threads, that I could look at
: which discuss the things people do to help to reduce the length of
: their code?
Some good starting points:
http://perlgolf.sourceforge.net/
http://perlgolf.org/
There are details of a number of past competitions on those sites,
including piles of code and discussions of players' inspirations and
algorithms.
Coming up with tips to improve your game is difficult. It's an art to
learn more than it is a craft to teach.
Study perlrun. There's powerful juju in those switches.
Some operators and functions have return values that you don't care about
in everyday code, but are beneficial in golfing. Study perlop, perlfunc,
and perlvar, especially the bits you've never used in your life.
Squish your code through the B:

eparse backend once in a while. The
deparser will often rearrange what you've written into dramatically
different syntax, which can give you ideas on tightening things up.
Drink lots of fluids.