chomp(my $host = qx(hostname -s)); foreach (@$ganglia_name){ system("ssh $_") unless ($_ eq $host); # run the job }