- or download this
$Href = {1=>1, 2=>2};
*H = $Href; # aliases the referenced variable as a real variable
print $H{1};
- or download this
use strict;
sub foo {
...
*H = $Href; # define the alais
print $H{1};
}
- or download this
use strict;
our %H; # have to create the global or local complains
...
*H = $Href; # define the alias
print $H{1};
}