Polish up your scripts with Optparse
If you've ever written an especially useful or popular script, you've noticed that features tend to creep into the codebase as you encounter variations in the input. As the code evolves to handle more and more variation, you may notice that distinct 'modes' of operation arise. One way to accomodate these different modes is to use values hard-coded into the source. Examples such as field delimiters, input path, recursive operation and output paths are often wired directly into the operation of quickly-written scripts. Read more