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
In reply to Re: A better way for walking through HoHoH ?
by jethro
in thread A better way for walking through HoHoH ?
by ZlR
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |