|Just another Perl shrine|
Re: Looking for pointers or optimizations.by greengaroo (Hermit)
|on Aug 21, 2012 at 13:39 UTC||Need Help??|
First, you should always explicitly close any filehandle, even if we all know it closes itself at the end of the script, it is good practice to close it as soon as you don't need it. About your elsif and else, you should start them on a new line.
or C style:
But don't mix both in your code! Choose one and always use the same.
Take some space, its free! If readability is important to you, don't be afraid to add empty lines, like before and after a loop statement or a if-elsif-else block.
Also, if you want to learn more, I recommend you read the book Perl Best Practices (O'Reilly). Not only they provide guidelines but also they explain why. Enjoy!
Take my advice. I don't use it anyway.