--- processmail/reminder.pl 2002/02/04 17:32:41 1.2 +++ processmail/reminder.pl 2005/02/15 19:27:51 1.3 @@ -1,6 +1,6 @@ #!/usr/local/bin/perl # -#$Id: reminder.pl,v 1.2 2002/02/04 17:32:41 boris Exp $ +#$Id: reminder.pl,v 1.3 2005/02/15 19:27:51 boris Exp $ # # Читаем файл и шлем e-mail # @@ -10,13 +10,13 @@ use Getopt::Std; -$usage = 'reminder.pl $Revision: 1.2 $, $Date: 2002/02/04 17:32:41 $'. "\n". -"Usage: reminder.pl [-d] [-m mail_file] [-o results] \n"; +$usage = 'reminder.pl $Revision: 1.3 $, $Date: 2005/02/15 19:27:51 $'. "\n". +"Usage: reminder.pl [-d] [-r round] [-o results] \n"; require 'parameters.pl'; require 'subroutines.pl'; -die $usage unless getopts('t:m:o:d'); +die $usage unless getopts('r:o:d'); $DEBUG=$opt_d; @@ -25,9 +25,15 @@ my %teams; # # Читаем ответы команд # -if ($opt_m) +$round=0; +if ($opt_r) { - die "Cannot open $opt_m\n" unless open(INFILE,$opt_m) + $round=$opt_r; + foreach my $file (split /\s+/, $FILES[$opt_r]) { + open (INFILE, $file); + readmail(\%teams); + close (INFILE); + } } else {