foreach $feature ( @{ $nc_list } )
{
- push @features, $feature if grep /$regex/i, @{ $feature };
+ push @features, $feature if grep { $_ =~ /$regex/i if defined $_ } @{ $feature };
if ( defined $feature->[ $index ] ) # sublist exists so recurse to this.
{