my $new_ref = filter_hash { $a =~ /color/ and !ref $b } $hashref;