in reply to IO::Select vs select function

I'm using 5.6 and I cannot find the behavior you allude to for select. I believe it returns (and always has) the number of file descriptors available for I/O or with events select is set to detect. AFAIK, that is the only return value for select.

( the UDP socket ) blocks if the UDP buffer has been emptied

I assume you mean that reading on the socket blocks if it is empty. You should be able to read the UDP socket to see if there is data on it. With fcntl's F_SETFL and O_NONBLOCK set, you should be able to read the socket until there is nothing to read. I have done this more than once on *nix systems with UDP sockets and IO::Select.

HTH, --traveler