Hi Anil,
> Does anybody know how to create the tree hierarchy of any text in Ruby?

You mean something like this?

http://www.rubyquiz.com/quiz40.html

Cheers,
Peter
___
http://www.rubyrailways.com
http://scrubyt.org