in reply to IO::Socket question

How would I ensure that I have received the entire messege?
Read the required amount of bytes (non-blocking or with timeout using alarm, for example), then use some thoughts from Knowing an IO::Socket handle has reached end-of-file to determine whether there is more data to read.