It a little bit misunderstandable...
let´s say i got 100 hashes named after each of my routers.
a list auf my routeres is in @allmyrouters.
My hashes contains fileds: ip, interfaces, admin.
I want to access each hashes field admin in a loop.
How do i do that?
-Ursprüngliche
use foreach keys(%ur_hash)
{
do something;
}
-
Get a bigger mailbox -- choose a size that fits your needs.
http://uk.docs.yahoo.com/mail_storage.html
on Mon, 26 Aug 2002 11:47:00 GMT, [EMAIL PROTECTED] (Angerstein)
wrote:
[blank lines trimmed]
It a little bit misunderstandable...
let´s say i got 100 hashes named after each of my routers.
a list auf my routeres is in @allmyrouters.
My hashes contains fileds: ip, interfaces, admin.
So,
use foreach keys (%ur_hash_table)
-
Get a bigger mailbox -- choose a size that fits your needs.
http://uk.docs.yahoo.com/mail_storage.html
on Mon, 26 Aug 2002 12:49:17 GMT, [EMAIL PROTECTED] (Dharmendra
rai) wrote:
use foreach keys (%ur_hash_table)
What is your point with this single line message?
Do you realize that
# WRONG
foreach keys (%ur_hash_table) {
# ...
}
is a syntax error? Did you test it?
Perhaps
u r right felix. that was a typing error. nothing else. sorry for that
-
Get a bigger mailbox -- choose a size that fits your needs.
http://uk.docs.yahoo.com/mail_storage.html
since you said you have a list of routeres in @allmyrouters, i am assuming
that they are stored in an array. if that the case, you can try:
my @allmyrouters = ({'ip'='1.1.1.1',
'interface'='interface1',
'admin'='admin1'},