in reply to hashing it out.

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Re: hashing it out.
by penguinfuz (Pilgrim) on May 10, 2002 at 22:09 UTC
    > something wrong with just using another hash for your hash/values?

    Maybe I am misunderstanding your reply, but I do not see how using multiple hashes would work with the foreach loop. From what I understand, your suggestion would look something like:
    foreach my $oid (sort keys(%iface)) { %oids = ("$iface{$oid}" => `$snmpwalk $ip $community $oid`); %oid2 = ("$iface{$oid}" => `$snmpwalk $ip $community $oid`); %oid3 = ("$iface{$oid}" => `$snmpwalk $ip $community $oid`); }
    It seems possible that I could "hard code" it without using the foreach loop, but the values of the %iface hash will not be constant, so I really must keep the code flexible, if you know what I mean.