Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: To sub or not to sub, that is the question?

by mrmick (Curate)
on Jun 25, 2001 at 17:21 UTC ( #91263=note: print w/ replies, xml ) Need Help??


in reply to To sub or not to sub, that is the question?

I always try to use the following:

  • If there is a single distinct operation being done, make it a sub.
  • If something is being repeated, make it a sub.
  • If making a decision within the program, make it a sub.
In other words, if in doubt, make it a sub. It will make your code easier to maintain.

Mick


Comment on Re: To sub or not to sub, that is the question?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-07-29 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls