Diff for /processmail/collection.pl between versions 1.3 and 1.4

version 1.3, 2005/01/24 03:16:35 version 1.4, 2005/02/16 22:25:59
Line 6 Line 6
 #  #
     use Getopt::Std;       use Getopt::Std; 
   
 $usage = 'collection.pl $Revision$, $Date$'. "\n".  $usage = 
 "Usage: collection.pl [-d] [-t table_file] [-m mail_file] [-o results] \n";  "Usage: collection.pl [-d] [-t table_file]  [-o results] \n";
   
 require 'parameters.pl';  require 'parameters.pl';
 require 'subroutines.pl';  require 'subroutines.pl';
   
 die $usage unless getopts('t:m:o:d');  die $usage unless getopts('t:o:d');
   
 $DEBUG=$opt_d;  $DEBUG=$opt_d;
   
   # Находим максимальный вопрос
   $MAXQUEST=1;
   for (my $i=1; $i<=$ROUNDS; $i++) {
       if ($MAXQUEST<$MAXQUEST[$i]) {
           $MAXQUEST=$MAXQUEST[$i];
       }
   }
   
   
   
 my %teams;  my %teams;
Line 33  if ($opt_t) Line 41  if ($opt_t)
 #  #
 # Читаем ответы команд  # Читаем ответы команд
 #  #
 if ($opt_m)  for (my $i=1; $i<=$ROUNDS; $i++) {
 {      foreach my $file (split /\s+/, $FILES[$i]) {
     die "Cannot open $opt_m\n" unless open(INFILE,$opt_m)          open (INFILE, $file);
 }          readmail(\%teams);
 else          collect_answers(\%teams,\@answers);
 {          close (INFILE);
     *INFILE=*STDIN;      }
 }  }
 readmail(\%teams);  
 close(INFILE);  
 #  
 # Чистим хэш %answers  
 #  
 collect_answers(\%teams,\@answers);  
 #  
 # Пишем измененную таблицу в файл.  # Пишем измененную таблицу в файл.
 #  #
 if ($opt_o)  if ($opt_o)

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>