Hash keys aren't modifiable. If you want to change a key, copy the value to the new key, and delete the old one, like this:
$hash{$new_key} = $hash{$old_key}; delete $hash{$old_key};
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Modifying hash keys via aliasing
by roboticus
in thread Modifying hash keys via aliasing
by vsespb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |