Maybe it would be easier to invert the levels of the hash:


my $re = shift;
my @f = @ARGV;
my %h;
/$re/ and $h{$1}{$ARGV}++ while <>;
for my $s ( keys %h ) {
  print "'$s' in ("@{[ keys %{$h{$s}} ]}),",
    " not (@{[ grep { not exists $h{$s}{$_} } @f ]})\n";
}


-- 
John Douglas Porter


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

Reply via email to