in reply to hashing it out.

If I understand you right (??), I think you're just using the wrong syntax for the hash assignment inside the foreach. Instead of this:
foreach my $oid (sort keys(%iface)) { %oids = ("$iface{$oid}" => `$snmpwalk $ip $community $oid`); }
I think you want this:
foreach my $oid (sort keys(%iface)) { $oids{$iface{$oid}} = `$snmpwalk $ip $community $oid`; }
because I think your description said something to the effect of "keys of %iface are used as parameters in a set of back-tick operations, and values of %iface are then used as keys of of %oids -- the values in %oids are the strings returned by the back-ticks." (I'm not asserting that this is any clearer than your own description, but if you get what I mean, then I must have gotten what you meant.)

Replies are listed 'Best First'.
Re: Re: hashing it out.
by penguinfuz (Pilgrim) on May 15, 2002 at 17:05 UTC
    > ...I think your description said something to the effect...
    > ...if you get what I mean, then I must have gotten what you meant.

    I think you understand my goal precisely; However, I'm not sure your suggestion will work either. After an initial attempt it did not work but I will continue thinking on it, but for now I am simply pushing the data into an array:
    foreach my $oid (sort keys(%iface)) { push @oids,"$iface{$oid}: ",`$snmpwalk $ip $community $oid`; }
    Not exactly what I want, so I think I will look into Net::SNMP now and revisit the issue when my "hash" skills are a bit stronger. ;)

    Cheers.