Hello again,
I'm trying to retrieve just a list of nodes from the following data dump:

i.e.  @array = qw(pnnixNodeCfgParentNodeIndex  pnnixRouteNodeFwdMetric1 pnnixRouteNodeFwdMetric2);
$VAR1 = bless( { 'tree' => { 'pnnixIAdjGroup' => { '1' => 'pnnixNumIAdj', '2' => 'pnnixIAdjTable' }, 'pnnixLinkEntry' => { '1' => 'pnnixLinkPortId', '2' => 'pnnixLinkType', '3' => 'pnnixLinkVersion', '4' => 'pnnixLinkHelloState', '10' => 'pnnixLinkCommonPeerGroupId', '11' => 'pnnixLinkIfIndex', '14' => 'pnnixLinkXmtHellos', '8' => 'pnnixLinkUpnodeId', '9' => 'pnnixLinkUpnodeAtmAddress' }, 'make_dump' => 1, 'use_dump' => 1, 'nodes' => { 'pnnixNodeCfgParentNodeIndex' => { 'status' => 'mandatory', 'description' => '"The local node index used to identify the nod +e that will represent this peer group at the next higher level of hierarchy, if this node becomes peer group leader. The value 0 indicates that there is no parent node."', 'syntax' => { 'type' => 'PnnixNodeIndex' }, 'oid' => [ 'pnnixNodePglEntry', '2' ], 'access' => 'read-write', 'type' => 'OBJECT-TYPE' }, 'pnnixRouteNodeFwdMetric1' => { 'status' => 'mandatory', 'description' => '"An alternate routing parameter for the forwar +d direction of this route. For information learned from PNNI nodes, this is the maximum possible cell rate (in cells per second) for the forward direction of the route. If this parameter is not used, its value should be set to 0xFFFFFFFF."', 'syntax' => { 'type' => 'Gauge' }, 'oid' => [ 'pnnixRouteNodeEntry', '10' ], 'access' => 'read-write', 'type' => 'OBJECT-TYPE' }, 'pnnixRouteNodeFwdMetric2' => { 'status' => 'mandatory', 'description' => '"An alternate routing parameter for the forwar +d direction of this route. For information learned from PNNI nodes, this is the Available cell rate (in cells per second) for the forward direction of the route. Further information on available bandwidth may be obtainable by reference to the nodal advertisements of the nodes in the path. If this parameter is not used, its value should be set to 0xFFFFFFFF."', 'syntax' => { 'type' => 'Gauge' }, 'oid' => [ 'pnnixRouteNodeEntry', '11' ], 'access' => 'read-write', 'type' => 'OBJECT-TYPE' }, 'pnnixRouteNodeFwdMetric3' => { 'status' => 'mandatory', 'description' => '"An alternate routing parameter for the forwar +d direction of this route. For information learned from PNNI nodes, this is the cumulative Maximum Cell Transfer Delay (in microseconds) for the forward direction of the route. If this parameter is not used, its value should be set to 0xFFFFFFFF."', 'syntax' => { 'type' => 'Gauge' }, 'oid' => [ 'pnnixRouteNodeEntry', '12' ], 'access' => 'read-write', 'type' => 'OBJECT-TYPE' },
This is the code I'm using, but itdoesn't seem to be working
my $name = $mib->compile($mib_name); print Dumper($name); my @trap = (); foreach ($name) { push @trap, $name->{'nodes'}->{$_}; }
Any ideas why @trap isn't getting populated?

update (broquaint): added <readmore> tag


In reply to Array from Data Dump 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.