The different behaviors of windows vs. linux might involve a number of issues. First off, you're opening a compressed file for input (via the $fh file handle), but then you're treating is as if it were plain text -- you don't seem to be doing binmode on it (which would be essential for it to work properly on windows, IIRC), and you use
while (<$fh>) to read it, as if you could reasonably expect it to be a series of "lines" terminated with the standard value of $/ ($INPUT_RECORD_SEPARATOR, which of course is a bit different on windows than it is on linux). I think tye's remarks about the buffering grid lock are on the mark in your case, but I also think that the way you're handling the input has something to do with it as well.
What you might want, rather than open2 or uncompressing to a temp file, is simply something like this:
open( IN, "gzip -cd $input_file_name |" );
while (<IN>) {
... # process lines of uncompressed text
}
I gather you want flexibility with different compression methods, and you would like to modularize it (give a file name to a sub, have it return a file handle for reading the uncompressed data). Both of those goals can be achieved with this sort of single-handle procedure (but I'll leave it to you to figure out how).