in reply to Re^2: how to output the final Tree into a file?
in thread how to output the final Tree into a file?

please excuse me but I m really new and it takes me a long time to understand many things

:) fragments which don't reproduce the error message, don't reproduce the error message -- you can't learn about the error message from those :)

diagnostics/perldiag/splain

perl -we" my $foo = 1; my $foo = 2; " "my" variable $foo masks earlier declaration in same scope at -e line +1. $ perl -Mdiagnostics -we" my $foo = 1; my $foo = 2; " "my" variable $foo masks earlier declaration in same scope at -e line +1 (#1) (W misc) A "my", "our" or "state" variable has been redeclared in +the current scope or statement, effectively eliminating all access to +the previous instance. This is almost always a typographical error. +Note that the earlier variable will still exist until the end of the sc +ope or until all closure referents to it are destroyed.

Replies are listed 'Best First'.
Re^4: how to output the final Tree into a file?
by dimitris852 (Acolyte) on Mar 16, 2016 at 00:33 UTC
    ok i can understand that i have already declared $treeout before. But I think that all the information of the tree that i need is stored in $treeout and i cant use it. Just emptying $treeout with undef has no point at all.

      That's right. Did you try:

      while ( my $tree = $treeout->next_tree ) { for my $node ( $tree->get_nodes ) { printf $fh "id: %s bootstrap: %s\n", $node->id || '', $node->b +ootstrap || '', "\n"; } }

      The way forward always starts with a minimal test.

      ok i can understand that i have already declared $treeout before. But I think that all the information of the tree that i need is stored in $treeout and i cant use it. Just emptying $treeout with undef has no point at all.

      Ah, ok, now instead of code fragments, we're going with thought fragment?

      Why don't you post the whole code?

        ok.Here is another thought fragment: I don't like ....let me think how this is called.... ah yes .. i don't like Mr Clever guys. this is what i absolutely hate in the scientific field.

        i just need to know if it is any way to extract the information of $treeout to a file.thats all.

        ps check my exp