good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Python dict to perl hashby Anonymous Monk |
on Mar 30, 2015 at 11:41 UTC ( [id://1121804]=note: print w/replies, xml ) | Need Help?? |
Given only your example, that looks fine. But if the input dict gets more complicated, the method may break, so it's not a good general-purpose solution. If this is a one-time thing, why not replace my $x = ... with the Dumper output, so you've got the hash written directly in Perl? Or, are you looking for a general solution?
In Section
Seekers of Perl Wisdom
|
|