What I need is to change the key 'key1' to 'key2'. Offcourse this can be achieved by$hash{'key1'} = "Value1" ;
Is there any other way other than adding and deleting elements?$hash{'key2'} = $hash{'key1'}; delete $hash{'key1'} ;
In reply to Modifying the keys in a hash by Mandrake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |