in reply to Parsing newick trees

Is not the structure you want but the method new of Parse::Eyapp::Node builds a similar structure:
$ perl -wde 0 main::(-e:1): 0 DB<1> use Parse::Eyapp::Node DB<2> x Parse::Eyapp::Node->new('A(B,C)') 0 A=HASH(0x860b980) 'children' => ARRAY(0x861c874) 0 B=HASH(0x8628568) 'children' => ARRAY(0x83284ec) empty array 1 C=HASH(0x861c928) 'children' => ARRAY(0x852d8a8) empty array 1 B=HASH(0x8628568) -> REUSED_ADDRESS 2 C=HASH(0x861c928) -> REUSED_ADDRESS