in reply to Code style question

Get yourself a copy of the book 'Perl Best Practices'. There is also a module called Perl::Critic which you can run your code through and it will highlight where you are deviating from the guidelines in the book. It can be a bit annoying at first but it is highly configurable and well worth it in the long run. Here is a short introduction.