in reply to How do I stop this from removing spaces?
my @filename_filter = ('*','|','<','>','?','/'); my $filename_filter = join '', @file_filter; $id =~ s/[\Q$filename_filter\E]//g;
That said, it's much much safer to specify which characters are safe to include rather than then specifying which characters are not safe to include.
|
---|