Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: XML to Hash Truncating Keys Problem

by hdb (Monsignor)
on Mar 28, 2019 at 15:22 UTC ( #1231810=note: print w/replies, xml ) Need Help??


in reply to XML to Hash Truncating Keys Problem

I am a bit confused by your logic here. First you apply the toHash function which returns a hash reference. But then you use Dumper to stringify it, this string is the output of your convert_xml_to_hash function. Upon return from your function, you eval it, which gives you (hopefully) a hash reference again. Then you use Dumper again to print it.

Have you tried to just use the output of the toHash function directly? With so much back and forth between hash and string, it is no wonder that Perl loses a few characters...

Replies are listed 'Best First'.
Re^2: XML to Hash Truncating Keys Problem
by haukex (Bishop) on Mar 28, 2019 at 19:52 UTC
    With so much back and forth between hash and string, it is no wonder that Perl loses a few characters...

    I agree with all of your post except for the last sentence, I disagree with it. Data::Dumper wouldn't just lose characters like that....

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1231810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2021-04-15 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?