delete returns the value of the key it deleted, so you actually only need:
$hasharr{$newkey} = delete $hasharr{$rephead};
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
In reply to Re: Re: modifying the key of hash of arrays
by hardburn
in thread modifying the key of hash of arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |