my @array_2 = grep { my $element = $_; $element->func() eq 'TEST' } @array_1;