my $val = 1; my %hash = ( \$val => 2 ); foreach my $ref (keys %hash) { print $$ref, "\n"; }