Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

RE: RE (tilly) 3: redeclaring variables with 'my'

by gharris (Beadle)
on Nov 13, 2000 at 21:50 UTC ( #41362=note: print w/ replies, xml ) Need Help??


in reply to RE (tilly) 3: redeclaring variables with 'my'
in thread redeclaring variables with 'my'

Thats probably one of the best explanations I could have asked for. And definately gets the point across. Though I have to say, that flies in the face of the all the 'good practices' that I learned in my CS classes.
eg:

<main program execution> function { <declare variables> <function logic> }

I also think you may have gotten the impression that I make everything a global var. That is actually not what I was saying. I use as few globals as possible (except when I make a 10 line script, in which case, well, everything is global)

But, I am always looking to write cleaner code, so I will be sure to pick up the book you recommend.

Thanks again for the thorough response.

--Glenn


Comment on RE: RE (tilly) 3: redeclaring variables with 'my'
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-28 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (252 votes), past polls