Hi

I have retrieved the following data struture using Data::Dumper, from the SNMP::MIB::Compiler module and am having trouble constructing a method to retieve a description based on a hash key for the following data structure:

$VAR1 = bless( { 'tree' => { 'attCNMds1StatusEntry' => { '1' => 'attCN +Mds1StatusIndex', '2' => 'attCN +Mds1LineStatus' }, 'att-products' => { '9' => 'att-cnmAgent' }, 'att-2' => { '1' => 'att-products', '2' => 'att-mgmt' }, 'attCNMds1ConfigEntry' => { '1' => 'attCN +Mds1ConfigIndex', '2' => 'attCN +Mds1LineType', '3' => 'attCN +Mds1ZeroCoding', '4' => 'attCN +Mds1ErrorsMaxIntervals', '5' => 'attCN +Mds1ErrorsIntervalLen' }, 'attCNMds1ConfigTable' => { '1' => 'attCN +Mds1ConfigEntry' }, 'att-mgmt' => { '15' => 'att-cnm' }, 'attCNMds1ErrorsEntry' => { '1' => 'attCN +Mds1ErrorsIndex', '2' => 'attCN +Mds1ErrorsInterval', '3' => 'attCN +Mds1ErrorsTimeStamp', '9' => 'attCN +Mds1ESs' }, 'attCNMds1ErrorsTable' => { '1' => 'attCN +Mds1ErrorsEntry' }, 'att-cnm' => { '3' => 'att-cnm-ds1' }, 'enterprises' => { '74' => 'att-2' }, 'att-cnm-ds1' => { '1' => 'attCNMds1Confi +gTable', '2' => 'attCNMds1Statu +sTable', '3' => 'attCNMds1Error +sTable' }, 'attCNMds1StatusTable' => { '1' => 'attCN +Mds1StatusEntry' } }, 'extensions' => [ '', '.mib', '.mib.txt' ], 'filename' => 'C:\\ATT/att_ds1.mib', 'types' => { 'AttCNMds1ErrorsEntry' => { 'items' => { + 'attCNMds1SEFSs' => { + 'type' => 'Gauge' + }, + 'attCNMds1LESs' => { + 'type' => 'Gauge' + }, + 'attCNMds1ErrorsIndex' => { + 'type' => 'INTEGER' + } } +, 'type' => 'S +EQUENCE' }, 'AttCNMds1StatusEntry' => { 'items' => { + 'attCNMds1StatusIndex' => { + 'type' => 'INTEGER' + }, + 'attCNMds1LineStatus' => { + 'type' => 'INTEGER' + } } +, 'type' => 'S +EQUENCE' } }, 'repository' => 'C:\\Compiled MIBS', 'dumpext' => '.dump', 'srcpath' => [ 'C:\\ATT', 'C:\\Compiled MIBS' ], 'allow_lowcase_hstrings' => 0, 'allow_underscore' => 0, 'accept_smiv1' => 1, 'allow_keyword_any' => 1, 'accept_smiv2' => 1, 'do_imports' => 0, 'root' => { 'iso' => { 'oid' => [ 1 ] }, 'ccitt' => { 'oid' => [ 0 ] }, 'joint-iso-ccitt' => { 'oid' => [ 2 ] } }, 'make_dump' => 1, 'use_dump' => 1, 'nodes' => { 'attCNMds1StatusIndex' => { 'status' => +'mandatory', 'description +' => '"A unique value for each DS1 interface. The interface identified by a particular value of this index + is the same interface as identified by the same v +alue of an attCNMifConfigIndex object instance."', 'syntax' => +{ + 'type' => 'INTEGER' +}, 'oid' => [ ' +attCNMds1StatusEntry', ' +1' ], 'access' => +'read-only', 'type' => 'O +BJECT-TYPE' }, 'attCNMds1LineStatus' => { 'status' => ' +mandatory', 'description' + => '"This variable indicates the most Line Status
I'm trying to retrieve the description for attCNMds1StatusIndex

Any ideas?

In reply to Data Dumper help by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.