Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: hashing it out.

by penguinfuz (Pilgrim)
on May 10, 2002 at 22:09 UTC ( [id://165790]=note: print w/replies, xml ) Need Help??


in reply to Re: hashing it out.
in thread hashing it out.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://165790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-23 15:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found