in reply to Executing data based on command line arguments

When you find yourself avoiding if...elsif...else because you have group of statements or conditions that you don't want to repeat in two places, that is usually a good sign that those statements/conditions should be wrapped up in a subroutine. Is there any reason why you have avoiding doing this so far?