in reply to Modifying hash keys via the control variable
# Simulate shift. (Does NOT work!) for my $i (1 .. $#array) { $i--; } [download]
To "change" a hash key, you have to delete it and create a new one:
$hash{newkey} = delete $hash{oldkey}; [download]