I always try to use the following:
- If there is a single distinct operation being done, make it a sub.
- If something is being repeated, make it a sub.
- If making a decision within the program, make it a sub.
In other words, if in doubt, make it a sub. It
will make your code easier to maintain.
Mick