According to the docs,
The file returned by File::Temp will have been opened in binary mode if such a mode is available. If that is not correct, use the C function to change the mode of the filehandle.
As such, re-add the :crlf normally present on file handles opened in Windows using the following after the open but before the print.
$fh->binmode(':crlf');