in reply to Converting hash structure into a special tree
How about Data::TreeDumper?
Outputs:use Data::TreeDumper; $Data::TreeDumper::Maxdepth=4; $Data::TreeDumper::Useascii=1; $Data::TreeDumper::Displayaddress=0; my $d= { "one" => 1, "two" => 2, "array" => [1,2,3,4], "hash" => {"test" => "me"} }; print DumpTree($d,'Contents of $d');
Contents of $d |- array | |- 0 = 1 | |- 1 = 2 | |- 2 = 3 | `- 3 = 4 |- hash | `- test = me |- one = 1 `- two = 2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Converting hash structure into a special tree
by ovedpo15 (Pilgrim) on Jan 13, 2019 at 14:33 UTC | |
by kschwab (Vicar) on Jan 13, 2019 at 14:46 UTC | |
by ovedpo15 (Pilgrim) on Jan 13, 2019 at 16:58 UTC | |
by kschwab (Vicar) on Jan 13, 2019 at 17:19 UTC | |
by ovedpo15 (Pilgrim) on Jan 13, 2019 at 17:53 UTC | |
by bliako (Monsignor) on Jan 13, 2019 at 20:20 UTC | |
Re^2: Converting hash structure into a special tree
by ovedpo15 (Pilgrim) on Jan 14, 2019 at 02:02 UTC |
In Section
Seekers of Perl Wisdom