Here is another way to modify the keys.
my %Orig=('a b'=>44, 'c d'=>22, rr=>99); my %Copy = map { $_ => $_=~ s/ /_/ } keys %Orig; print qq(C: $_ => $Copy{$_}\n) for keys %Copy;
Originally posted as a Categorized Answer.
In reply to Re: How do I modify the KEYS in a hash (copy)
by sen
in thread How do I modify the KEYS in a hash (copy)
by NetWallah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |