Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Style & subroutine organization

by jryan (Vicar)
on Aug 29, 2001 at 18:38 UTC ( [id://108768]=note: print w/replies, xml ) Need Help??


in reply to Style & subroutine organization

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://108768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found