in reply to Do file.pl (replacing subs?)

Putting every function in a separate file is not usually the way to go, since it tends to make maintenance harder, not easier. However, it is sometimes used to save memory and time by not compiling a bunch of code that doesn't usually get run. This is generally accomplished with the AutoLoader module, which automates the job of splitting the subs out into files.

If you do decide to use a multi-file approach, I strongly recommend using "require" instead of "do" (for reasons already listed in this thread), and making the individual files separate packages with subs and nothing in their main:: space. This is a much cleaner way to do it, and avoids many problems with scoping and potential conflicts. Otherwise you'll have to keep track of which subs you have in each file and make sure you don't accidentally name two of the same, and ditto for global variables.