I have found one error with reading the bytes as the first parameter of the receive is where the actual data goes.
But I still think that I am not reading the full required set of bytes. What is the correct way to determine if there are more bytes to read ? Do I need to use select?

In reply to Re^2: Reading a GZIP network stream by weismat
in thread Reading a GZIP network stream by weismat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":