my (@hosts, @uphosts, @downhosts); if ( -e "ship.cfg" ) { open (CFGFILE, "ship.cfg") || die $!; #### while (my @TMP=) { #### # while () { #### # while (defined(my $line = )) { # ... # } #### #if ( $_ =~ /^#/ ) { next } # commented out in the OP #### foreach $_(@TMP) { #### if ($_ =~ /^([\w.]+)$/) { #### $_ = $1; #### push (@hosts, $1); } else { next; } #### close (CFGFILE); #### # Just cleaning up the verbage is are host hosts etc... if (scalar(@downhosts) == 1 ) { $verbage[2]="is"; $verbage[3]="host" if (scalar(@uphosts) == 1 ) { $verbage[0]="is"; $verbage[1]="host"; } #### # We don't care about things that don't exist... unless (scalar(@downhosts) == 0) { print p,"There $verbage[2] ",scalar