in reply to A question of style.

I strongly recommend picking up Code Complete by Steve McConnell.

For just a random tidbit, you should change your indent to something in the range 2-4 because in tests that level of indentation results in the best comprehension.

He also offers much good advice on variable naming, how to factor code into functions, etc.

Be warned. It is not about Perl. But it will make your Perl, along with every other language you know, much better.

Replies are listed 'Best First'.
Re: Re (tilly) 1: A question of style.
by jlongino (Parson) on Oct 30, 2001 at 23:26 UTC
    All of the advice you've received so far is fantastic, but I'm kind of surprised that nobody has mentioned (although it is implied in tilly's response) that when you start nesting large amounts of code into conditional blocks you should immediately think modularize. Break some of those chunks into subroutines and it will be much easier on the eyes.

    --Jim

    Note: apologies if someone else has already mentioned this and I missed it.