in reply to How do I find the missing curly brace??
Have you ever had a perl script that is like 20000 lines long
Yes, inherited.
Learn VCS. Learn to commit small pieces with detailed but concise messages. Then break that up into multiple functional subroutines. Each sub should do only one thing (if possible), and its name should reflect what it does. If at all possible, try to keep the length of each sub so you can see the entire thing on one screen.
Capture data from the script now (specifically print out information from each small piece you're going to change), write tests for each small piece you're going to migrate to a subroutine or other library, ensure the new code does what the old code does, then move on to the next section. Now you've got regression tests.
|
---|