in reply to In place file modification

Most programs involve a lot of infrastructure that can be reused for other purposes. This is why we have modules and design patterns. What you're looking at as a lot of work is, frankly, a lot of work. You're doing the following:

That you're dealing with names and addresses is irrelevant to the rest of the work you have to do. Just imagine how much work you would have to do if you didn't have open(), <>, regexes (or split), hashes (or arrays), and print() ... this is why we use Perl.

Now, once you have this infrastructure, there's a lot of different tasks that become a lot easier. Proper design and decomposition avoids bugs you didn't realize were possbile and enables features that you didn't even imagine you could have for as little effort as they end up being. I've lost count of the number of times I've told a boss "Because of doing things the right way, we now have some major feature that no-one even thought about that can now define our product."


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?