for my $key ( keys %hosts ) { ssh1 (gather data); ssh2 (gather data); ssh3 (gather data); }