The stupid question is the question not asked | |
PerlMonks |
Re: Style & subroutine organizationby jryan (Vicar) |
on Aug 29, 2001 at 18:38 UTC ( [id://108768]=note: print w/replies, xml ) | Need Help?? |
Definately your first example. The point of a function is to have a reusable code block. Therfore, its best to have each function just do the specific task that you want, even if in this example they will be called consecutively. You may find later on that you might need to use that particular function in a different program, and it will be much easier to implement if the function doesn't have a lot of clutter that needs to be removed.
In Section
Seekers of Perl Wisdom
|
|