in reply to how to traverse thru this hash?
That should printfor my $computer (keys %instructions) { my $commands = $instructions{$computer}; for my $comm (keys %$commands) { my $argument_sets = $commands->{$comm}; for my $args (@$argument_sets) { my @values = @$args; print "$computer: $comm: [@values]\n"; } } }
unless I made a mistake. The code is untested but looks ok to me.comp1: cmd2: [test2 type1 view1] comp1: cmd1: [test1 type1 view1] comp1: cmd1: [test2 type1 view1]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to traverse thru this hash?
by kwaping (Priest) on Nov 03, 2005 at 22:46 UTC | |
by japhy (Canon) on Nov 04, 2005 at 00:55 UTC | |
by kwaping (Priest) on Nov 04, 2005 at 15:38 UTC | |
by japhy (Canon) on Nov 04, 2005 at 15:59 UTC |