in reply to Script Review...

I wholeheartedly echo the strict and warnings sentiments of the other Monks.

As for your style in general, well, everyone has their own, and asking for comment on this subject is bound to yield many contradictory answers. However, there are at least two things your style must be: consistent and logical.

For example, why is it that you put parentheses around all my declarations even if you only declare one variable? The parentheses are needles unless you're declaring multiple variables with the same declaration. Granted, it's consistent, but not very logical. Notice, you do the exact opposite with print(); all calls to print() are completely devoid of parentheses, even if you supply multiple arguments to it. Why is that?

Try to come up some well-thought-out rules and use them constantly. For example, one I subscribe to is, when using built-in functions (which are thus prototyped), only use parentheses with named list operators and and only when your supplying more than one argument. E.g.:

# see: open(NAME, "< file") || die $!; print("one", "two", "three"); # and see: chop $string; carp "Some error."; # but see: print "a string"; my @stuff = split /\s/;

You get the idea. The thing is, you can only adopt and apply such a rule if you're reasonably familiar with Perl's built-in functions and what arguments they're prototyped to expect. If you're not, see perlfunc. Misunderstanding of built-ins and their precedence and prototypes is often the cause of inconsistent/needless usage of parentheses in beginner to intermediate Perl programmers' scripts.

One other thing I noticed was the comments. Throughout the script you switch between using single #, double ##, and even triple ###, and even then you mix things up by having some comments with a leading space between the last # and the text, and others with the text right after the last #.

Again, pick a style and stick with it.

The consensus in this area is, try to use only one # and have a leading space between the # and comment text. For example:

# a comment. # a multi- # line comment.
is typically easier to read than:
#a comment. #a multi- #line comment.

There are other things too, like how some assignment statements have spaces on both sides of = and others have no space between = and the lvalue and rvalue. Just try editing the script with logic and consistency in mind. And it wouldn't hurt to at least compare any new style rules you devise with the "official" ones in perlstyle, and then try to prove to yourself that your rules are better than perlstyle's; and if you can't, abandon your's and stick with perlstyle's.