in reply to A better way for walking through HoHoH ?
Aside from the aesthetic aspect there is practically no problem with loops that only loop once or twice.
To shorten later access you could change the loops to
foreach my $host (keys %rez) { foreach my $tgtp ( values %{ $rez{$host}{'tgt'} } ) { foreach my $dev ( keys %$tgtp ) { #do something with $tgtp->{$dev}
You could also use map instead of foreach loops, but that would be just window dressing as map is just another type of loop
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: A better way for walking through HoHoH ?
by ZlR (Chaplain) on Mar 24, 2010 at 13:40 UTC |