rather than this: } else { use this: } else { #### This: unless ( scalar(@downhosts) == 0 ) { print p, "There $verbage[2] ", scalar(@downhosts), " $verbage[3] unreachable\n", br; } rather than: unless ( scalar(@downhosts) == 0 ) { print p, "There $verbage[2] ", scalar(@downhosts), " $verbage[3] unreachable\n", br }