if ($counter == scalar(@rundates)) { print "$procids[$procloop] is outside expected time range. +\n" ; my $cmd = "ssh $nodenum kill -9 $procids[$procloop]"; #print is to see if anything is killed, and make sure comm +and syntax is correct print "$cmd\n"; system ($cmd); }