my $lol =$vocabulary->tree_to_lol; my $code =$vocabulary->tree_to_lol_notation({multiline=>1}); print "$code\n"; __END__ [ [ [ [ 'dog' ], 'domestic' ], [ [ 'tiger' ], 'wild' ], 'animals' ], [ 'sciences' ], [ 'vehicles' ], 'vocabulary' ],