+foreach my $ip ( keys %$response ) {
+
+ my $status = $response->{$ip};
+ foreach my $group ( grep { /\w+\.\w+/ } keys %$status ) {
+ my ( $prefix,$name ) = split(/\./,$group,2);
+ foreach my $i ( 0 .. $#{ $status->{$group} } ) {
+ $status->{$prefix}->[$i]->{$name} = $status->{$group}->[$i];
+ }
+ delete $status->{$group};
+ }
+
+ print "$ip ",dump($status);
+}