open (F91, "f91");
open (WALL, ">f91.wall");

@Month = ('null', 'January', 'February', 'March', 'April', 'May', 'June',
          'July', 'August', 'September', 'October', 'November', 'December');

$Room{'26-100'} = '\\tsix';
$Room{'10-250'} = '\\ten';
$Room{'Kresge'} = '\\kresge';

while (<F91>)
{
  s/\s\s+/@/g;
  ($month, $date, $title, $room, $time) = m=^(.*)/(.*)@(.*)@(.*)@(.*)$=;
  $time =~ s= & =/=g;
  print "on $date of $month at $time in $room is $title.\n";
  
  print WALL "\\myvskip\n" if $date > $lastdate + 1;
  $lastdate = $date;

  print WALL "\\month\{$Month[$month]\}\n" if $month>$lastmonth;
  $lastmonth=$month;

  $title =~ s=&=\\&=;
  print WALL "\\movie\{$date\}\{$title\}\{\}\{\}\{$time\}\{$Room{$room}\}\{\}\{\}\n";
}
