http://qs1969.pair.com?node_id=824443


in reply to reparse tree in textfile

Thanks for your efforts ikegami (Apostle) and repellent (Chaplain)

Awesome!!

worked on 70,000 line backup text file

I used

my @path = '.';

while (<STDIN>) {

chomp;

my ($prefix, $node) = /^((?:\| )*`-- )(.+)/

or next;

$#path = length($prefix)/2 - 1;

$path-1 = $node;

# print $prefix, join("/" => @path), "\n";

print join("/" => @path), "\n";

}

ikegami yes, I didn't want prefix printed