grep { grep { $_->text eq $search_text } $_->children } @data; #### grep { $_->text eq $search_text } map { $_->children } @data;