However, I'm not sure I would recommend it, as I don't think it makes what you are trying to do any clearer, and it has the potential to modify values that also match the regex!%hash = map { s/^key1$/new_key2/; $_; } %hash;
In reply to Re: Modifying the keys in a hash
by sluap
in thread Modifying the keys in a hash
by Mandrake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |