Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: XML to Hash Truncating Keys Problem

by hdb (Monsignor)
on Mar 28, 2019 at 15:22 UTC ( [id://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 (Archbishop) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found