A few comments:
- All your subroutine definitions use the "no parameters" prototyping by virtue of adding "()" in their definitions. Indeed none of your subroutines take any parameters, so that is not wrong, but then you call al your subroutines by prepending "&" to their names which has the effect of ignoring any prototypes. It is far better to delete all the prototyping as it probably does not do what you think it does and also delete all the "&" in the sub-calls which serve no purpose here.
- You have a peculiar way of naming your variables and subroutines. While not "wrong" as such, it is not the perlish way. I wonder what was your native computer language before you started programming in Perl. Anyhow, the use of "::" in variable names and subroutines is reserved for using packages ("namespaces", if you wish), but you do not use packages here and frankly for a program of this size that does not use any modules, it is overkill to use namespaces. Everything can safely live in the main package (which is the default package).
- Your use of local is ... strange. Did you do it so your program runs under use strict;? Again, probably you have a wrong concept of what local does. If you want to declare global (in the sense of can-be-seen-and-accessed-everywhere) then you can safely use lexical "my" variables, placed outside of any subroutine or block.
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||