#!/usr/local/bin/perl

do '/usr/221B/hakinq';

$today = (localtime)[3];
$smonth = ('January','February','March','April','May','June','July','August','September','October','November','December')[(localtime)[4]];

$bday = sprintf("%s %d",$smonth,$today);

print $scan;dbmopen(INQUIR, $inquir_file, 0666);
print("#This file is machine generated.  Altering it is a Bad Idea.  Use Inquir.\n");

umask(113);

open(FINGER, ">/usr/221B/fingerbase");

while(($key,$entry) = each %INQUIR) {
  %entry = split(/$inquir_delim/, $entry);
#  if ($entry{"BIRTH"} =~ /^$bday$/) {
#    system'/bin/cat /usr/221B/bdaymessage|/usr/ucb/mail -s "Happy Birthday!" ',$entry{"UNAME"};
  printf (FINGER "%-8s:  %s", $entry{"UNAME"}, $entry{"NAME"});
  if (defined($entry{"NICK"}) && length($entry{"NICK"}) > 0) {
    printf(FINGER "  (%s)\n", $entry{"NICK"});}
  else
    {printf(FINGER "\n");}
  if (defined($entry{"NETAD"}) && defined($entry{"UNAME"})) {
    if (length($entry{"NETAD"}) > 0) {
      if ($entry{"NETAD"}=~/^[^|<>][^<>]*$/) {
	print $entry{"UNAME"},": ",$entry{"NETAD"},"\n";}}}
}

close(FINGER);
dbmclose(INQUIR);


