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

Re: Why is 'our' good?

by RonW (Parson)
on Mar 14, 2017 at 23:25 UTC ( #1184621=note: print w/replies, xml ) Need Help??


in reply to Why is 'our' good?

Coming from a C background, I rarely use "global" variables. When I do, I use our because (1) the syntax is simpler, and (2) I can initialize the variable where it's defined. Also, I use it where use vars would be used. while I can see some value in using our in an inner scope, it's not something I've needed to do myself.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2020-09-30 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (160 votes). Check out past polls.

    Notices?