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'},
{'ip'=>'2.2.2.2',
'interface'=>'interface2',
'admin'=>'admin2'});
foreach(@allmyrouters){
print "$_->{'ip'} $_->{'interface'} $_->{'admin'}\n";
}
if you need to add another entry to the @allmyrounters, you can do:
push(@allmyrouters,{'ip'=>'3.3.3.3','interface'=>'interface3','admin'=>'admin3'});
david
Angerstein wrote:
> 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?
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]