@files = grep{ my $i = $_; !grep{ $i =~ /\Q$_\E$/ }@unwanted }@files;