in reply to Removing Bad Characters from a String
$bad_chars = qr{[!~?/@]}; # remove any potential bad characters $filename =~ s/$bad_chars//g; [download]