in reply to How can I create a file named "default.asp?11=1"?

I agree with the hex conversion in file names, but I'd say only convert file name invalid characters to hex as it's done in URLEncode almost. The invalid characters in windows filenames are:
\/:*?"<>|
append % to the beginning of the encoded char and also encode the % char.
my $name = "abba?@fzabb=11'a" $name =~ s/([\\\/:\*\?"<>\|])/\%unpack('H*', $1)/g; # name is now: abba%3f@fzabb=11'a%22
Or you can use ord instead of unpack.