Okay .. this works ...
sub getApSrvs
{
my %apsrv;
my $cluster;
foreach $cluster (getClusters())
{
$apsrv{$cluster} = [split('\s+', `/$cluster/bin/gethosts -t app|sort -u`)];
}
return %apsrv;
}
... now how in the ham sandwich do I get this to print like so $cluster --> $hostname
okay I added :
my %apsrv = getApSrvs();
for my $cluster (keys %apsrv) {
print "$cluster -> $apsrv{$cluster}\n";
}
and I get ...
qboc22 -> ARRAY(0x9111618)
qboc5 -> ARRAY(0x9111504)
qboc32 -> ARRAY(0x90e20cc)
qboc28 -> ARRAY(0x90e1d28)
qboc30 -> ARRAY(0x90e1f38)
qboc23 -> ARRAY(0x9111540)
qboc27 -> ARRAY(0x911181c)
qboc29 -> ARRAY(0x91115ac)
qbo -> ARRAY(0x90e2294)