in reply to Parsing a Tree to a Table.
Why is the question on hold at SO? Looks like someones homework alright, but to reverse tree visualisation is a valid problem and potentially useful to someone. Anyway, I hoped there would be some extra neat solution, then spent ten minutes correcting one silly mistake after another. Almost a one-liner:
#! /usr/bin/perl -ln /\|\s*$/ or /.*?--(-?)|/, splice(@a,$+[0]/3), $1 ? print join "\t", @a +[0..2], $' : push @a, $';
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Parsing a Tree to a Table.
by choroba (Cardinal) on Dec 10, 2013 at 01:34 UTC | |
by oiskuu (Hermit) on Dec 10, 2013 at 13:43 UTC |
In Section
Meditations