So your program is blocking while it tries to read about 100MB (or until an EOF returns) from a socket. Apparently the server on the other side doesn't deliver that data.
You could just set a timeout, so a recv will fail if it doesn't provide any data. Or you could investigate non-blocking IO. What do you want?
Comment on Re: Receiving an XML packet using IO::Socket