my %hash = (a => 1, b => 2, c => 3, d => 4); for (keys %hash) { *$_ = \$hash{$_}; } $hash{c} = "foobar"; print "$c\n";