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