I guess I didn't give enough information (I'm generally as hard to start as a lawnmower in winter). I am actually walking the MIB tree for some MIBs that are defined in our snmpd.conf as processes. As such, the results of the walk give us , for example:
1.1:1 1.2:2 1.3:3 2.1:httpd 2.2:sendmail 2.3:portmap 3.1:5 3.2:0 3.3:0 4.1:0 4.2:0 4.3:0 5.1:3 5.2:0 5.3:0 101.1:My error message for httpd 101.2:My error message for sendmail 101.3:My error message for portmap
This is unchangeable in terms of order. The value before the ':' is the trail of the OID and the value after si the actual data I need in my script to use. But my problem is that the number fo services could change on the fly so I won't know how many services are being monitored. As a result, I need ot be able to take every instance of 2.x:$serviceName and create an array of the values. My approach is to find out how many services and then go back through the list leapgfrogging through the list to get the values which match up with the service. Does that make sense? Me, either. Thanks again. CiceroLove

In reply to Re: Dynamic array names by CiceroLove
in thread Dynamic array names by CiceroLove

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.