in reply to hashing it out.
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.)foreach my $oid (sort keys(%iface)) { $oids{$iface{$oid}} = `$snmpwalk $ip $community $oid`; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: hashing it out.
by penguinfuz (Pilgrim) on May 15, 2002 at 17:05 UTC |