my @arr = grep { local $/; open my $fh, '<', $_ or die $!; my $text = <$fh>; $text =~ /IsFrequentlyUsed<\/value>/; } glob '*';