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

Re^3: Populating Arrays of Arrays

by Mugatu (Monk)
on Mar 03, 2005 at 20:56 UTC ( [id://436367]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Populating Arrays of Arrays
in thread Populating Arrays of Arrays

Is that really a big deal?

It's indicative of a weak understanding of lexical scope. It's a symptom of a problem, not a problem in and of itself. Putting a huge block of my declarations at the top of the file is not a whole lot better than using package variables for everything. About the only benefit you get from strict is checking for typos.

I prefer to scope variables as tightly as possible. That means, at the latest possible time and smallest possible block for the code to still work. Then, not only do I get protection against typos in variable names, I also get protection against inadvertant action-at-a-distance.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-09-15 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.