in reply to Re: Office file becomes corrupt once extracted from gz
in thread Office file becomes corrupt once extracted from gz

I can't believe I didn't think of binmode. I searched the docs and I found that IO::Uncompress::Gunzip has a binmode so I enabled that and now the files are getting extracted perfectly.

Thanks for your help.