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


in reply to Re: How can I populate attributes of a hash into another ?
in thread How can I populate attributes of a hash into another ?

Calls to keys and values are guaranteed to return data in a consistent way, so you could simply write:

@chapter{ keys %book } = values %book;