use Data::Dumper; ... print Dumper $tree->{children}[0]; # if the above produced more than "$VAR1 = {};" or "$VAR1 = undef;", post # those results back here. If it didn't, perform the following # and post those results print Dumper $tree; ... @{$tree->{children}}[0]->{label} =~ s/^\*//;