Look Ma ! - No temp hash! (Good if you are doing this check only a small number of times).
if ((my $x=grep {/ABC|GHI|MNO/}@FILES) == 3){
print qq|Found them all\n|
}else{
print qq|found only $x\n|
}
Update Ignore the buggy version above. Revised, based on
morgons (++) observations below ..
my @need=sort qw|ABC GHI MNO|;
my $flat=join "",@need;
my $re="\\b" . join( "|",@need)."\\b";
if ($flat eq join( "", sort grep{m/$re/}@FILES)){
say "Found!"
}
I hope life isn't a big joke, because I don't get it.
-SNL