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:
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.