At 03:52 PM 3/14/01 -0800, Paul wrote:
But nothing about the structural/algorithmic mechanics. :<
From the perlsub docs:
Variables declared with my are not part of any package and are therefore
never fully qualified with the package name. In particular, you're not
allowed to try to make a package variable (or other global) lexical:
my $pack::var; # ERROR! Illegal syntax
my $_; # also illegal (currently)
In fact, a dynamic variable (also known as package or global variables) are
still accessible using the fully qualified :: notation even while a lexical
of the same name is also visible:
package main;
local $x = 10;
my $x = 20;
print "$x and $::x\n";
That will print out 20 and 10.
There is _no_ stash of lexicals during execution, only during
compilation. I guess one of the reasons lexicals are faster.
Elizabeth Mattijsen