Perl : Generating a hash of hashes from a hash of multi-line strings