in reply to Redoing a script
There is a lot of fairly dodgy code in there. Nothing really terrible, but lots of sloppy coding like several subs where the only difference is in variable names, or the use of prototype subs that would cause the code to fail except that the subs are defined after their first use so the prototypes are ignored (it's not important that you understand what that means btw). To be fair there is some good code there too, but it would be hard for a newbie to pick what is good and what is bad. With a good tidy up I'd expect that code to reduce to about 2/3 of its current size and to become easier to understand too.
If you have the option I'd suggest you start from scratch for the new project and come back to PerlMonks to ask questions when you get stuck. You aren't going to learn a lot that is good working from the code you have shown us. Unless someone provides a complete solution for you, it'll probably be quicker to dump this code and start over for the new task. If you do, please come back to have it critiqued so we can help you learn appropriate Perl coding habits.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Redoing a script
by Marshall (Canon) on Feb 15, 2012 at 14:31 UTC |