Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: What to use instead of global variables

by educated_foo (Vicar)
on Mar 28, 2012 at 01:49 UTC ( #962045=note: print w/ replies, xml ) Need Help??


in reply to What to use instead of global variables

I'm trying to write code to comply with Perl best practices...
Please don't do this. As the quote at the top of the page says, "P is for Practical." Write your programs to solve your problems, not to please language scolds on the internet.


Comment on Re: What to use instead of global variables
Re^2: What to use instead of global variables
by Anonymous Monk on Mar 28, 2012 at 20:43 UTC

    While you have a point (do not follow style for style's sake), these "language scolds" are quite correct when the goal is to write maintainable code. (And it should be, for any non-small program!) If you think you will never have to revisit your code to fix or improve it (say, a one-time script), you are indeed free to ignore best practises and just write something that works.

    Thus spake the master programmer:
    "Though a program be but three lines long, someday it will have to be maintained."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (16)
As of 2014-09-23 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (222 votes), past polls