in reply to Refactor and simplify

Thanks for the suggestions (and the stories). The versioning system made sense as a way to approach this particular problem. On my side was the fact that management and my fellow coders agreed that the code in question was ugly, rushed, and unmaintainable. (Of course, it isn't too hard to persuade a coder that someone else's code is horrible.)

Our site does have separate development and test systems to fool with code before it goes live. I was able to procure some test data to run through the old scripts, index the results, and use them to make sure my modified produced identical results.

I'm up to revision 6 now, with the main script rewritten as Perl, and only two shells left to convert to functions. Thanks for everyone's input.