It's called a typeglob. To get your example to work you will need a use vars qw($z) or specify the full package of the variable:
Not that this will not work with a lexical $z declared with my as it has to be a package variable.use strict; my $x=2; *main::z=\$x; print $main::z;
/J\
In reply to Re: Trying to understand aliasing (*var)
by gellyfish
in thread Trying to understand aliasing (*var)
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |