($BlockingFlags, $InBytes, $OutBytes, $LatchErrorFlags) = $PortObj->is_status || warn "could not get port status\n"; $ClearedErrorFlags = $PortObj->reset_error; # The API resets errors when reading status, $LatchErrorFlags # is all $ErrorFlags since they were last explicitly cleared if ($BlockingFlags) { warn "Port is blocked"; } if ($BlockingFlags & BM_fCtsHold) { warn "Waiting for CTS"; } if ($LatchErrorFlags & CE_FRAME) { warn "Framing Error"; }