2 $SNMP::save_descriptions = 1; # must be set prior to mib initialization
3 SNMP::initMib(); # parses default list of Mib modules from default dirs
5 # read dotted decimal oid or symbolic name to look up
6 # partial name will be searched and all matches returned
7 $val = shift || die "supply partial or complete object name or identifier\n";
9 if ($node = $SNMP::MIB{$val}) {
10 print "$node:$node->{label} [$node->{objectID}]\n";
11 while (($k,$v) = each %$node) {
15 while (($k,$v) = each %SNMP::MIB) {
16 print "$v->{label} [$v->{obj}]\n" #accepts unique partial key(objectID)
17 if $k =~ /$val/ or $v->{label} =~ /$val/;