in reply to IO::Socket::SSL's select() ignores pending data
Why not read all available data at once?
$len = sysread($fh, $buf, $fh->pending(), length($buf)); [download]