in reply to Code Optimization v5.8.1

I agree with simon and combatsquirrel in the way the program should be solved. In addition, you have recieved some good advice on picking up meryln's book ("Learning Perl" published by O'Reilly), (etc) to improve your style. Being on a boring telecom, I'll give your code a quick review though for some of the misconceptions you would like pointed out. Others can add more. Perl is weird in that "Perlishness" is kind of a zen, so writing baby-perl (as either Merlyn or Larry or Tom put it) is acceptable as you attempt to write more perl in the style of the perl idiom.

In my opinion (and all things are always subject to debate):

These are just a bunch of random comments, but you were asking for them, so I thought I would share. As you grow as a Perl programmer you will learn new tweaks and stuff, and your code will grow more elegant and easy to understand. Enjoy the process, as Perl is a really fun language and allows for some neat constructs. Don't be worried that people are pointing out ways you can improve, this monastery is an incredible resource. Most of all, realize Perl is fun!