http://www.perlmonks.org?node_id=1215072


in reply to [CLOSED] Dereference hash into hashes by key

And, gosh, if a tiny little few-line subroutine named replace_key() (hint, hint ...) makes your actual intention perfectly clear for everyone who will follow in your footsteps . . . what's a few extra source-lines between friends? In that tiny-subroutine you can delete the old key and insert a new one ... and do anything and everything else you like ... and your source-code now consists of only one line! (Woo, hoo!)