If you set the $LIST_SEPARATOR ($") variable to the empty string (it is a single space by default), your substitution will not remove a space. The array variable is being interpolated as if it were in double quotes inside s/// (see Quote and Quote like Operators):
$" = '';
$id='TEST TEST';
print "$id\n";
@filename_filter=('*','|','<','>','?','/');
$id =~ s/[@filename_filter]//g;
print "$id\n";
__END__
TEST TEST
TEST TEST