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.
In reply to Re: Some suggestions on coding style - a chance to critique
by lestrrat
in thread Some suggestions on coding style - a chance to critique
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |