#!/s/std/bin/perl -w

use strict;
use CSL::DBs;
use CSL::Sybase;
use CSL::Pg;
use DBI;

my $dbhp = DBI->connect($CSL::DBs::csdb);
my %hash;

my $splat = $dbhp->selectall_arrayref("select hostname from splat.hostnames order by hostname asc");

foreach (@$splat) {
	my $host = $_->[0];
  $hash{$host} = 1;
}

open("FH", "</s/dhcp/conf/dhcpd.conf") or invalid("Could not open the specified file: $!");

while (<FH>) {
  if ($_ =~ /host\s+(\w+)\s+\{/) {
    my $dhost = "$1.cs.wisc.edu";
      print "$dhost\n" unless $hash{$dhost};
  }
}
close("FH");
