Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Re: Re: Getting readable results from Net::SNMP get_table method

by fingers (Acolyte)
on May 16, 2001 at 04:29 UTC ( #80760=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Getting readable results from Net::SNMP get_table method
in thread Getting readable results from Net::SNMP get_table method

When I use
print "$result->{$_}\n" for keys %$result;
I get output that looks like
HASH(0x82a08e0)->(1.3.6.1.4.9.9.23.1.2.1.1.8.4.2)
when I use the Data::Dumper module you suggest I get results that look like.
'1.3.6.1.4.9.9.23.1.2.1.1.8.4.2' => 'WS-C6509'
I assume that the oid is the key and the WS-C6509 is the object in the hash.

How would I pull that all into hash that I would be able to manipulate?

Replies are listed 'Best First'.
Re: Re: Re: Re: Getting readable results from Net::SNMP get_table method
by mr.nick (Chaplain) on May 16, 2001 at 05:22 UTC
    You asked for the contents of OID 1.3.6.1.4.9.9.23.1.2.1.1.8.4.2 and got it back, 'WS-C6509'.

    That data is in a hash, $result. You would access the data ala

    $result->{'1.3.6.1.4.9.9.23.1.2.1.1.8.4.2'}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://80760]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2023-01-28 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?