[LA.pm] Alias to a dynamically scoped variable?
William Reardon
wdr1 at pobox.com
Sat Aug 27 14:43:04 PDT 2005
Just wondering, is it possible to create an alias to a dynamically
scoped variable?
E.g, such as in this case $foo & $bar both equal 20?
{
my ($foo, $bar);
*foo = *bar;
$foo = 10;
$bar = 20;
print "foo: $foo\n";
print "bar: $bar\n";
}
When run with warnings, it's clear that the aliasing is taking place
on the global versions of foo, not my my guys.
(I've found a different way to do what I was trying, so at this
point, it's just curiosity.)
Thanks!
-Bill
More information about the Losangeles-pm
mailing list