$ snmpset -r 1 -t 1 -c $COMM $host $oid $type $val #### # something like this $rc = $sess->set( [ $oid, $type, $val ], { retries => 1, timeout => 1 } ); if ( $rc != OK ) { if ( $rc != TIMEOUT ) { # some real error happened, do something } else { # probably worked but we got no response like we expected } } else { # wow, it worked and we got a response... }