in reply to Re^2: What does $::var means
in thread What does $::var means

They are not the same variable. The lexical variable declared as my $var is only accessible within the scope within which it is defined, whereas the package variable $main::var is essentially accessible anywhere. The package variable appears in the global symbol table whereas the lexical variables have their own 'pad' so they occupy a different namespace.

/J\