Perl Namespaces

Namespaces: best discussion ever of what’s really going on with Perl variables and why it’s confusing sometimes.

The problem with Perl isn’t that it has no clearly-defined system of name management, but rather that it two systems, both working at once. Here’s the Big Secret about Perl variables that most people learn too late: Perl has two completely separate, independent sets of variables. One is left over from Perl 4, and the other is new. The two sets of variables are called package variables' andlexical variables’, and they have nothing to do with each other.