Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Challenge: Dumping trees.

by Anonymous Monk
on Oct 13, 2012 at 02:58 UTC ( #998815=note: print w/replies, xml ) Need Help??


in reply to Challenge: Dumping trees.

I've spent the last couple of days trying to code this but haven't yet succeeded. Any offers?

(NOTE: I'm looking for a compact dump to a terminal; not presentation quality graphics here. Ie. I'm not looking for GraphViz or similar, so please don't tell me about those.)

Hmmm. I've seen something resembling that in Tree::Visualize, I'm sure the BOX-ing can be easily undone ... Tree::Visualize::ASCII::BoundingBox ... here is a start

See also http://stackoverflow.com/questions/801740/c-how-to-draw-a-binary-tree-to-the-console which appears right on the money but I've not tested it

I really am surprised there isn't something in the GraphViz family to do this already, graph-easy can read DOT files but the output isn't exactly what you want

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998815]
help
Chatterbox?
[shmem]: Lady_Aleena: fix it, or delete it ;-)
[Lady_Aleena]: shmem, I'm not sure how.
[shmem]: well, deleting is done with 'rm' :-P
[shmem]: you can break up the chain MP3::Tag->new($_)- >interpolate("\%S ") and test whether MP3::Tag->new($_) is true
[Lady_Aleena]: shmem, no to deletion.
[shmem]: can't help you there since that song is not on my bench
[Lady_Aleena]: shmem, I need to look at MP3::Tag to see how to get the date from one song.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2017-04-23 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.