XP is just a number | |
PerlMonks |
Re: Hash substitutionby suaveant (Parson) |
on Oct 09, 2008 at 12:41 UTC ( [id://716201]=note: print w/replies, xml ) | Need Help?? |
You can't change the key of a hash because the key decides how to find the data based on an algorithm. You must instead move the value, easiest done this way: The delete removes the value from the old hash location and returns the value, allowing you to put it in the new hash location.
In Section
Seekers of Perl Wisdom
|
|