Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://962045]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2018-05-22 21:33 GMT
Find Nodes?
    Voting Booth?