Nils-Anders Persson wrote:
> Hello,
>
> I've seen many discussions regarding the use of "use strict".
>
> What i wonder is why is it so bad using global variables?
>

It's not. It's bad to use global variables /all the time/, even if
you don't need them. Most variables are only in use for short
sections of code, and using the same global variable everywhere
you have, say,

    for ($i = 0; $i < $len; ++$i) {
        :
    }

will get very confusing and lead to awkward-to-find bugs.

>
> And another question how do you define constants in perl?

    use constant MEANING_OF_LIFE => 42;

HTH,

Rob






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

Reply via email to