in reply to Re: when to use subroutine
in thread when to use subroutine

makes testing easier

I was waiting for someone to say that. If you put a chunk of code in a sub, and then move the sub to a module, you can write automated tests that verify that that sub does what you think that it does (and they can be run again at any time to verify that it hasn't broken for some reason since you last looked at it).

Sharing code and improving clarity are important, but making sure the code works is important also: if you can break any bit of functionality out into a sub, it becomes possible to test it to make sure it really does function.

(It might be better if you started reversing the sense of the question: "Is there any reason I shouldn't put this piece of code into a sub?")