in reply to Graphical Hierarchical Tree

You should print something like:
print '--'x$indent, $subject;