It's not a rule, just a rule of thumb: if a subroutine is too long to fit in a terminal screen, say 50x70, the subroutine is probably too long.
What was said already applies. With unit tests (a test for each sub), refactoring is safe and often fun. So write them if you don't already have them. Without examples, concrete advice that won't be misconstrued is hard to offer.
In reply to Re: Thoughts on using subroutines to clean up code?
by Your Mother
in thread Thoughts on using subroutines to clean up code?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |