in reply to Some suggestions on coding style - a chance to critique
I personally hate this style script:
#!perl my $var = ...; my @var = ...; sub1(); sub2(); exit 0;
I think this leads to a lot of global variable usage and sloppy code in general. I personally prefer using a single entry point, and keeping everything in there
#!perl main(); sub main { my $var = ...; my @var = ...; sub1($var); sub2(@var); exit 0; }
Don't know about you, but I find this less error prone.
I also think that the $$hash{ element } notation is confusing.... It's not that much different, but I think @{ $hash->{ element } } would be easier to read than @{ $$hash{ element } } or some such thing.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Some suggestions on coding style - a chance to critique
by emilford (Friar) on Jun 26, 2002 at 15:40 UTC | |
by lestrrat (Deacon) on Jun 26, 2002 at 17:57 UTC | |
by dragonchild (Archbishop) on Jul 01, 2002 at 18:55 UTC | |
by blakem (Monsignor) on Jul 01, 2002 at 21:03 UTC | |
by Anonymous Monk on Jul 01, 2002 at 22:14 UTC |
In Section
Meditations