perl -MIO::Zlib -e '$fh = IO::Zlib->new("test.gz", "wb"); print fileno($fh)'