If I have the following, how do I get to the members?
$servers = [{'hostname'=>'s ecure',
'description'=> 'www'},
{'hostname'=> 'www3',
'description'=> 'www'},
{'hostname'=>'w ww6',
'description'=> 'www'}.
{'hostname'=>'w ww10',
'description'=> 'www'},
{'hostname'=> 'mail',
'description'=> 'mail'}];
I used to have a simple list of servers and I would say something like:
foreach $i (@servers)
But now I want to associate more info with each server entry.
So, how can I get my list of servers to iterate over?
Thanks,
Joe
$servers = [{'hostname'=>'s ecure',
'description'=> 'www'},
{'hostname'=> 'www3',
'description'=> 'www'},
{'hostname'=>'w ww6',
'description'=> 'www'}.
{'hostname'=>'w ww10',
'description'=> 'www'},
{'hostname'=> 'mail',
'description'=> 'mail'}];
I used to have a simple list of servers and I would say something like:
foreach $i (@servers)
But now I want to associate more info with each server entry.
So, how can I get my list of servers to iterate over?
Thanks,
Joe
Comment