On Tuesday, June 4, 2002, at 06:27 , Richard Adams wrote:
[..]
> The fog has lifted and all has become clear...
[..]

my complements to bob for the as expected excellent outline
of the basics about lexical scoping.

the other obligatory read is:

        http://perl.plover.com/FAQs/Namespaces.html

since the backside of 'our $foo' is 'local $foo' - all of
which is about how we cope with scope....

cf:
        http://perl.plover.com/local.html


As a general rule of thumb I am a fan of 'my' and avoid the
'our/local' issues....

cf: http://www.wetware.com/drieux/pbl/bloopers/ourVmyWithConstant.txt

In part because of the need to worry about doing 'global'
declarations - hence the need to localize them as needed....

If you opt instead to pass data into and out of functions,
then your functions stop being the cause of strange side effects,
because, well, you don't use them to cause strange side effects...


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to