in reply to Re: Using Tree::Simple with while loop and input file.
in thread Using Tree::Simple with while loop and input file.
for (grep $tree{$_}, keys %tree) { my @g = $_; push @g, $_ while $_=$tree{$_}; print(join(':', @g), "\n"); }
And why bother with an array?
for (grep $tree{$_}, keys %tree) { my $g = $_; $g .= ":$_" while $_=$tree{$_}; print("$g\n"); }
|
|---|