for 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"; } } } #### comp1: cmd2: [test2 type1 view1] comp1: cmd1: [test1 type1 view1] comp1: cmd1: [test2 type1 view1]