sub POSIX_FIONBIO () { (0x80000000 | (4<<16) | (ord('f')<<8) | 126) } # 0x8004667E ioctl($sock, POSIX_FIONBIO, pack("I", 1)) or $! == 0 # ** or die(...); # ** - ioctl is returning undef, # yet both $! and $^E are 0. # I don't know what this means.