You will have to switch STDIN to binary before reading the binary upload data. If everything in CGI.pm works as I expect, you can probably do a binmode STDIN and possibly binmode $file right before reading from $file.
By the way, I've always distrusted the use of the param() as both providing the file name and the handle. If that doesn't work, you may want to use $cgi->upload('file') to get the file handle.
In reply to Re: CGI.pm: "Malformed UTF-8 character" in apache's error.log
by Joost
in thread CGI.pm: "Malformed UTF-8 character" in apache's error.log
by isync
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |