Re: convert oid to numeric in Perl API

2010-05-31 Thread Montaseri
See SNMP::translateObj() will convert a text obj tag to an OID and vice-versa. Cheers Medi On Mon, May 31, 2010 at 8:59 AM, Joao Ferreira gmail < [email protected]> wrote: > Hello all, > > I did not find a function in the Perl API to obtain > the .number.number.number representat

convert oid to numeric in Perl API

2010-05-31 Thread Joao Ferreira gmail
Hello all, I did not find a function in the Perl API to obtain the .number.number.number representation of a given OID... so I wrote my own function - sub oid2numeric { my ($oid) = shift; my @vals = $oid->to_array(); my $joined = join('.',@val