[ Sorry for piggy-backing on Sherm's post, but my news feed has gone
flaky lately, and I don't expect to ever see the post he is
replying to.
]
eg:
You should look both ways before crossing the street.
While in the form of a "dictate", that criticism is pretty
clearly "constructive", even when you do not understand why
you should do it.
You may get hit by a bus before you fully understand why you
should look both ways.
If you don't understand the difference, it seems to me the most prudent
thing to do would be to follow the advice of those who *do* understand
it...
Yeah, becoming a grease spot before you get time to do the research
could be a real bummer.
When self-teaching, you should realize that you probably are
missing many fundamentals.
When you come across one, you have basically 3 choices:
1) take a pause from what you are really doing, and go
figure out this missing fundamental.
2) take it "on faith", and maybe hope to figure it out later
(but in the meantime you get the benefit that made it a
fundamental in the first place).
3) ignore it (and learn first-hand what thousands have already
learned the hard way).
You may choose to repeat the mistakes of those that went before you,
but that is such an inefficient method of learning that a
conscientious practitioner would feel compelled to at least let
you know that you are making it harder on yourself than it needs to be.
... and then change your mind if/when you're experienced enough to know
when it's appropriate to do so.
Controlling variable scope (ie. "globals are bad!") has been
industry practice for decades, nothing specific to Perl in that.
To understand applying that fundamental to Perl, see:
"Coping with Scoping":
http://perl.plover.com/FAQs/Namespaces.html