in reply to Re^2: Global Variables
in thread Global Variables

Well...close, but not exactly. If you are using "use strict", which you evidently are, this is 100% correct. But you should know that without the strict option, a variable can be declared anywhere simply by using it. When not using the strict constraints, the best way I know to describe scoping is "global once declared".

Replies are listed 'Best First'.
Re^4: Global Variables
by johngg (Canon) on Nov 27, 2007 at 23:15 UTC
    But you should know that without the strict option, a variable can be declared anywhere simply by using it.

    IMHO, since kmullin is a self-confessed mewbie, you should add a strong health warning to that statement, perhaps something along these lines. Don't be tempted to turn off strictures to silence intractable compilation errors; always use strict;.

    Cheers,

    JohnGG

      Render your statement in 20 point bold, and I'd have to agree.

      Ditto the -w switch ( or use warnings)